Ok, I follow you now.  That makes sense.  Sort-of :)

On the other hand, it's only inconsistent if you consider clojure's = to map 
to java's .equals method, but it does not:

user=> (clojure-version)
"1.2.1"
user=> (= 3 3.0)
true
user=> (.equals 3 3.0)
false

So it doesn't really violate the contract for java's Map, which tells us 
that if a.equals(b), then they must have the same hash, and so a and b 
cannot both be keys. If you think of clojure's = as a looser sort of 
equivalence, then it's not a problem. I think.

In any case, the 1.3 behavior does feel weird in sometimes:

user> (def i 3)
#'user/i
user> (def j 3.0)
#'user/j
user> (< i j)
false
user> (> i j)
false
user> (= i j)
false

OK, that kind-of freaks me out...  :)

- Chris


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