Dave Sann <daves...@gmail.com> writes: > On transients: > At the moment, I disagree - I think that there are some situations > where *strictly contained* mutability can make a solution simpler as > well as possibly more efficient. I offer no proof :)
You might be right or not, but Stephen is completely right that you won't benefit from *transients* with respect to conciseness/simplicity. It'll only change your code's shape from (loop [foo [], ...] (if (seq ...) (recur (conj foo ...)) foo)) to (loop [foo (transient []), ...] (if (seq ...) (recur (conj! foo ...)) (persistent foo))) I.e., you can't "bash them in-place" but still have to use the return value of updating function calls. And the set of functions on transient collections is much narrower than the set of functions on persistent collections. So it's really only a performance optimization. Bye, Tassilo -- 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