Skip to content

Do something with IReadOnlyCollection and ICollection. We needs good abstractions hierarchy. #20399

@dmitriyse

Description

@dmitriyse

Just drop IReadOnly****, mark them obsolete.
We can't do anything with backward compatibility here.
If we inherit ICollection from IReadOnlyCollection we will broke existing code.
See: http://stackoverflow.com/questions/12622539/why-doesnt-generic-icollection-implement-ireadonlycollection-in-net-4-5

But may be sometime will be good point do do this breaking change, provide tools for migration automation.

And also IReadOnly*** is not clear solution, we needs IReadable*** and IImmutable****

This is not-null reference types like problem. But it's second after nullability.
Let's start/continue to solve this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.CollectionsenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions