What I meant is that (= 3 3.0) is the erroneous behavior.
Either it's equal every where (including as keys in maps) or not.
You cannot have both semantics coexists. It's all or nothing.
Look at this the other way around (1.2):
user=> {3 :a 3 :b}
java.lang.IllegalArgumentException: Duplicate key: 3
user=> (= 3.0 3)
true
user=> {3.0 :a 3 :b}
{3.0 :a, 3 :b}
This is non sense, if 3.0 and 3 are to be equal, then the last map should also
fail
with a duplicate entry.
It's an inconsistent behavior.
On Sun, 2 Oct 2011 13:31:40 -0700 (PDT)
Chris Perkins <[email protected]> wrote:
> Luc,
>
> I think you are mistaken.
>
> user=> (clojure-version)
> "1.2.1"
> user=> (def m {3.0 :a 3 :b})
> #'user/m
> user=> (get m 3.0)
> :a
> user=> (get m 3)
> :b
> user=> (= 3 3.0)
> true
> user=>
>
> Do you have another example?
>
> - Chris
>
--
Luc P.
================
The rabid Muppet
--
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