Why isn't mutable a subtype of immutable, or vice versa?
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Why isn't mutable a subtype of immutable, or vice versa?
Unofficial Hacker News client; not affiliated with Y Combinator.
comrade1234 · · focus · HN ↗
catoc · · focus · HN ↗
Swift is completely different. Standard arrays are structures, always mutable - value types passed by value