‹ BackHN Continuity

Thread

Why isn't mutable a subtype of immutable, or vice versa?

28 points · 56 comments · ibobev

  1. raincole · · focus · HN ↗
    In other words, immutable != read only.

    In C# ReadOnlyCollection<T> and ImmutableArray<T> are two completely different things for this exact reason.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.