‹ BackHN Continuity

Thread

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

28 points · 56 comments · ibobev

  1. Mikhail_Edoshin · · focus · HN ↗
    So the problem is that the semantic of methods (car, cdr) is not well defined: it is either "give me that member" or "give me that member and guarantee next time the result will be same". And the solution is to clearly separate those by adding more method names.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.