2 ms·
Lisp is not an immutable language. There's setf and setq for assigning; nconc, nsubst, and the destructive list operations; rplaca and rplacd; etc. It's easy
by jlarocco 12y ago
Lisp is not an immutable language.
There's setf and setq for assigning; nconc, nsubst, and the destructive list operations; rplaca and rplacd; etc.
It's easy to write Lisp that doesn't mutate (let), or use constructs that hide it (dolist, dotimes, etc.), but mutable data has been in Lisp since the beginning.
That said, there are languages in the family that don't allows mutation, but they're a small minority.
- nickbauman 12y agoClojure isn't immutable either. It favors immutability, though, and has strong opinions directing the developer away from mutable state.