Transient support for sorted sets/maps?

193 views
Skip to first unread message

Michel Alexandre Salim

unread,
Jun 4, 2012, 3:57:36 AM6/4/12
to cloju...@googlegroups.com
Hi all,

CLJ-995 requests support for sorted sets -- and since that's backed by a
(sorted) tree map, that would imply supporting transients for sorted
maps as well.

http://dev.clojure.org/jira/browse/CLJ-995

Are there any technical reason why this cannot/shouldn't be done? The
documentation on transients -- http://clojure.org/transients --
mentioned that it does not make sense for some data structures, using
lists as an example, but didn't say anything about maps and sets. (The
answer might be obvious to those who grok the implementation of
persistent trees, but it escapes me at the moment)

http://clojure.org/transients

I suppose one could always do a (transient (set the-sorted-set)), edit
that, and then create a sorted-set from the result, but that'd require
first creating a hash map, and later creating a tree map -- seems like a
lot of overhead.

If it's possible and just hasn't been done, I might try taking a stab at
it. But please stop me before I do something futile!

Thanks,

--
Michel Alexandre Salim
�blog: http://identi.ca/hircus
http://twitter.com/hircus
GPG key ID: A36A937A

() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Reply all
Reply to author
Forward
0 new messages