Steve, I've been checking out the Java, and it looks the same to me. I think this raises a couple issues:
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" <[email protected]> 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: > > "Currently only vectors are supported, and note that not all Clojure data > structures can support this feature, but most will. Lists will not, as there > is no benefit to be had." > > That appears a bit out of date given these grep results on master: > > public class PersistentArrayMap extends APersistentMap implements > IEditableCollection { > public class PersistentHashMap extends APersistentMap implements > IEditableCollection { > public class PersistentVector extends APersistentVector implements > IEditableCollection{ > public class PersistentHashSet extends APersistentSet implements > IEditableCollection { > > It looks to me like PersistentTreeMap and PersistentTreeSet have just not yet > been extended to support transients. > > --Steve -- 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
