On Nov 8, 4:45 pm, Greg <g...@kinostudios.com> wrote: > > I must say it would be really nice if this was considered kosher.. as it does > work just fine. It would also be useful to know why transient bashing is > frowned upon. >
It's not that it's "frowned upon" - it simply doesn't work. Functions that operate on transients (conj!, assoc!, etc) return the modified data-structure, just like their non-transient counterparts. It just so happens that due to an implementation detail, they sometimes return the same instance, modified in-place, that you passed to them. The key word there is "sometimes" - you can't count on that behavior. If you have been working with small collections, and "bashing in-place" is working for you, you've just been lucky. Your luck will not last ;) - Chris -- 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