Hi,

I was investigating an issue in a library which defines a macro that uses 
transients, and discovered some unexpected behaviour (at least unexpected 
to me). 

I would really appreciated it if someone could shed some light on this 
behaviour and the best way of dealing with it.

If I do something like:

(def trans (transient {}))
(assoc! trans :a "a")
(assoc! trans :b "b")
(assoc! trans :c "c")
(assoc! trans :d "d")
(assoc! trans :e "e")
(assoc! trans :f "f")
(assoc! trans :g "g")
(assoc! trans :h "h")
(assoc! trans :i "i")
(assoc! trans :j "j")


Then as expected 

(:a trans)
=> "a"

and the same for everything up to :h, but I didn't expect

(:i trans)
=> nil
(:j trans)
=> nil

If I do
 
(dissoc! trans :a)
(assoc! trans :i "i")
(:i trans)
=> "i"

It would appear that the transient map is limited to 8 keys, which I assume 
is not the case, so there is something wrong with my understanding of how 
these work.


Thanks

Mark

-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to