News for hackers. Stuff that matters.
Re:On Lisp by brudgers on Monday August 26, 2013 @08:59AM (#6276714)
Indeed, On Lisp has an excellent discussion of mutation and its use in programs written in a functional style. In discussing destructive functions, Graham describes the ways in which they can be used with reasonable safety - e.g. immediately mutating a list newly created by a mapping function.

The reasons one might do so in Clojure are likely to bear similarity to those provided by Graham - speed and memory - despite the vastly greater resources of today's computers versus those of 1991.

Re:On Lisp by chongli on Monday August 26, 2013 @12:50PM (#6278186)
Very good point. Mutation is extremely useful when birthing a new data structure; this is a time when it's not yet visible to the rest of the system so the danger of sharing intermediate state does not occur. Clojure has a very elegant facility for dealing with this particular scenario:

http://clojure.org/transients