On Dec 17, 2:16 pm, Martin Coxall <pseudo.m...@me.com> wrote: > On 17 Dec 2009, at 10:04, Dmitry Kakurin wrote: > > > Please keep in mind that it is almost literally the speech that I give > > to my friends/colleagues when they ask me why am I so excited about > > Clojure. I did it many times now and I have quickly learned that > > saying "persistent data structures" gets misinterpreted by every > > single person as "something you can save to file [as XML/binary]", > > i.e. serialization. > > So the funny thing is: by changing my tune and being imprecise, I > > communicate the basic idea much better now :-). > > I note that Haskellers don't refer to their data structures as "persistent", > despite the fact that lazy evaluation means they get persistence of all data > structures 'for free'. > > They seem to use the rather vague "purely functional data structure". >
There are differences in strictness in the interpretation of "persistent". At the most basic, it just means creating a "changed" version leaves the old version intact. But, if you use amortization in your analysis of the cost model for the data structure, then many such purely-functional data structures do not maintain their performance bounds when used in a non-ephemeral, i.e. persistent way. This latter characteristic does not come for free merely via immutability or laziness. The use of the term persistent for Clojure data structures is the stricter sense, both that old versions are unchanged and available *and* that performance guarantees are met when used persistently. See: Purely Functional Data Structures - Okasaki for details. Rich -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en