Re:Why Ruby is an acceptable Lisp (2005)
by zodiac on Sunday September 11, 2016 @11:48AM
(#12473903)
Didn't racket also make the decision to make cons create immutable lists (and using mcons for mutable lists)?
Re:Why Ruby is an acceptable Lisp (2005)
by qwertyuiop924 on Sunday September 11, 2016 @02:59PM
(#12474998)
But that's not what Clojure did. In clojure, cons cells aren't cons cells: they're a cell that can point to a sequence of some type, and contain a pointer to arbitrary data. They also do not make up lists, and have weird equality rules.
Racket's conses are merely immutable.
Re:Why Ruby is an acceptable Lisp (2005)
by qwertyuiop924 on Sunday September 11, 2016 @06:21AM
(#12472744)
However, conses can be used for other types of structures as well.
Note that linked-lists are only a good data structure in fairly narrow contexts (e.g. shared structure, certain types of mutation you can do). Since Clojure is focused on limiting mutation, it makes sense for them to use Seqs instead of linked-lists.