> Is there a variation of hash-map which supports comparison of keys
> using identical? rather than = ?  Ditto with sets.

There is java.util.IdentityHashMap, but it is mutable.

What objects are you trying to store? The ideal in the Clojure world,
is that most objects are immutable.

  Immutable objects will implement value equality in .equals() ('=' in
  Clojure), and you shouldn't care about whether two objects are
  identical? because it won't affect anything.

  Mutable objects will implement .equals() the same as identical?, so
  you shouldn't need to use identical? because .equals() ('=') will do
  the same thing.

Of course, if you are using Java objects from some existing code, they
might not implement equality in the ideal way described above.

-- 
Dave


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