I like this very much... that's the kind of clever optimizations that preserves Clojure principles and can yield significant performance increases. This could also help dealing with performance critics in these small mutable languages "benchmarks" that newbies attempt to clone in Clojure.
Thank's Rich ! Luc On Wed, 2009-08-05 at 17:09 -0700, Rich Hickey wrote: > > > On Aug 5, 7:48 pm, Stu Hood <stuh...@gmail.com> wrote: > > I really, really like this feature. My only complaint is that you have to > > use different names for the modifying functions. If the function signatures > > will be identical to their non-transient variants, then I guess the primary > > arguments would be: > > * Clojure convention for names of functions with side-effects, > > * An additional interface check in conj/assoc? > > > > But if after calling (conj v 1), you can't use the 'v' reference anymore, > > then did you really cause a side effect? Its another tree falling in the > > woods situation. > > > > Not at all. The normal persistent functions, e.g. conj/assoc, make a > promise that the thing they return *can* be held onto, indefinitely, > and immutably, and reused, thus 'persistent'. Calling an operation > that does not make those guarantees the same thing would be destroying > that promise. The names have to be different. > > Rich > > > > Luc Préfontaine Armageddon was yesterday, today we have a real problem... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---