Re: Transient Collection Identity

2016-04-22 Thread Alex Miller
transient collections collect values in an internal (mutable) data structure and periodically add them in batch. So you will typically see the identical value returned for a while, then it will change. You should *always* use the return value - the same usage pattern as with persistent collecti

Re: Transient Collection Identity

2016-04-22 Thread Timothy Baldridge
The answer is that you should treat them as you would persistent structures. It's true that they don't always change, but they may eventually change and without notice. For vectors this will be somewhere in the range of once every 32 conj! calls, but could change in a future version of clojure, so

Transient Collection Identity

2016-04-22 Thread JvJ
While doing operations on transient collections, I've noticed that the result of assoc! or conj! is always identical to the original structure (i.e. it satisfies "identical?", and is not merely equivalent). Is this always the case, or can the return value of assoc! or conj! sometimes be a diff