Skip to content

Why doesn't IDictionary<T, U> implement IReadOnlyDictionary<T, U>? #61281

Discussion options

You must be logged in to vote

Classes that would implement IFile wouldn't break, since it would still have the very same components.

This is only true if you recompile from source. For all packages involved (think nuget dependencies). This is what the other issue is talking about when they refer to "binary compatibility". So if your code was recompiled to use this change, but you were using packages that hadn't, things would explode.

I understand that such a change could potentially break projects now as conflicts could indeed happen. But why wasn't such a modification made when the read-only interfaces were introduced?

Because there would have been issues with doing it when the interfaces were introduced, too.

i…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@IrvingDecarlo
Comment options

Comment options

You must be logged in to vote
1 reply
@IrvingDecarlo
Comment options

Answer selected by IrvingDecarlo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants