> Clojure 1.3.0-alpha* uses its own = function for map lookups specifically to
> avoid this problem. The = function is true for numbers of different types
> but the same value. Note that Java code dealing with Clojure maps using the
> java.util.Map interface will still get the standard Java behavior using
> Object.equals.
Shouldn't this return nil then?
user=> *clojure-version*
{:major 1, :minor 3, :incremental 0, :qualifier "alpha6"}
user=> (.get {1 2} (Integer. 1))
2
Also, if the above is the intended behavior, there are some weird
consequences with the current record equality semantics. For example,
user=> (defrecord P [])
user.P
user=> (defrecord Q [])
user.Q
user=> (= (P.) (Q.))
false
user=> (.equals (P.) (Q.))
true
user=> {(P.) 1 (Q.) 2}
{#:user.P{} 1, #:user.Q{} 2}
user=> (java.util.HashMap. *1)
#<HashMap {user.P@0=2}>