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 don't count on it.

As the docs say: "Don’t bash in place"

http://clojure.org/reference/transients

On Fri, Apr 22, 2016 at 1:38 PM, JvJ <[email protected]> wrote:

>
> 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 different object?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to