On Sun, Jun 13, 2010 at 2:51 AM, Neil Van Dyke <n...@neilvandyke.org> wrote: > 2. What was the rationale for not having "pair?", "car", "cdr", work on both > mutable pairs and immutable pairs? Was this to push everyone harder towards > immutable pairs, at the cost of having to convert legacy libraries and > breaking R5RS compatibility?
Having immutable and mutable pairs be distinct turns out to be very valuable for Typed Scheme/Racket. Mutable pairs support more operations, so in one sense they should be subtypes of pairs in general. But mutable pairs support fewer equations, and so cannot be used in places where immutable pairs are allowed, so cannot be treated as subtypes. This makes the story for hashtables, vectors and boxes much more complex, and I'm happy that it's not the case for pairs. -- sam th sa...@ccs.neu.edu _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users