user=> (transient (sorted-map 1 2 3 4))
java.lang.ClassCastException: clojure.lang.PersistentTreeMap cannot be
cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
user=> (transient (sorted-set 1 2 3 4))
java.lang.ClassCastException: clojure.lang.PersistentTreeSet cannot be
cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
Is this desired behavior?
Sean
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
1. Should sorted versions get transient support in 1.1?
2. The docs should be updated to reflect the 1.1 status of
transients.
Sean
On Dec 19, 10:23 am, "Stephen C. Gilardi" <squee...@mac.com> wrote:
> > I was experimenting with transients, and they don't seem to work for
> > sorted collections:
>
> > user=> (transient (sorted-map 1 2 3 4))
> > java.lang.ClassCastException: clojure.lang.PersistentTreeMap cannot be
> > cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
>
> > user=> (transient (sorted-set 1 2 3 4))
> > java.lang.ClassCastException: clojure.lang.PersistentTreeSet cannot be
> > cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
>
> > Is this desired behavior?
>
> Fromhttp://clojure.org/transients:
I would vote for "no" and "yes", respectively.
Adding transient support to a collection has a history of adding
bugs as well, until they're ironed out. I think 1.1 is the wrong
timeframe for that. Perhaps 1.2?
I've updated http://clojure.org/transients to reflect vectors and
hash-map support of 'transient' in 1.1.0
--Chouser
> I've updated http://clojure.org/transients to reflect vectors and
> hash-map support of 'transient' in 1.1.0
Hash-sets appear to work in 1.1.0 as well.
--Steve
Sean
On Dec 20, 11:56 am, "Stephen C. Gilardi" <squee...@mac.com> wrote:
> On Dec 19, 2009, at 7:50 PM, Chouser wrote:
>
> > I've updatedhttp://clojure.org/transientsto reflect vectors and