Hacker News new | past | comments | ask | show | jobs | submit login




That's nice, but in Scheme, all pairs constructed by any code anywhere are mutable, and structure made out of mutable pairs can be passed into any library function. An object notation like (a b c) read from a stream gives you a mutable object.

It's a significant language difference that can't be papered over with a data type and handful of functions.


That's a different concern.

Racket supports both immutable and mutable cons cells. Convenient or not - you decide.

Oh, been watching too much YouTube.

In both Racket and Scheme it is usually a good idea to program in a functional style - i.e. not to mutate pairs.

The compiler and runtime system can in some situations handle immutable pairs more efficiently than mutable pairs. So if mutable pairs are seldomly used, it makes sense to make immutable pairs the default.

The rationale why Racket made the shift is described here:

http://blog.racket-lang.org/2007/11/getting-rid-of-set-car-a...

In short: the Racket community sees the immutable default as a plus.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: