Hi all,

I've implemented IEditableCollection support for ninjudd's
PersistentOrderedSet.  But when using that, my application delivered
wrong results.  See <87hbb6c4qf....@member.fsf.org> and follow-ups.

I was able to track it down to the strangeness in the subject:

  (.contains (transient (hash-set)) foo)

returns true for any object foo, that is, the empty transient hash-set
contains everything.

The above clojure code is equivalent to this java code, which I used in
the PersistentOrderedSet extension:

  ((ITransientSet) PersistentHashSet.EMPTY.asTransient()).contains(o)

For now, I worked around this strange behavior by checking the count()
of the TransientHashSet backing my TransientOrderedSet implementation in
addition to contains().

But anyway: Is that behavior intended and facilitated internally
somehow?  If so, is there some documentation about the rationale?

Bye,
Tassilo

-- 
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

Reply via email to