user=> (def m { 3.0 :a 3 :b}) #'user/a user=> a {3.0 :a, 3 :b} user=> (get m 3.0 ) :a user=> (get m 3 ) :b user=>
if 3.0 and 3 were to be considered equals, you could not represent the above map, the second entry would squash the first. Now if we want to allow such maps, then we cannot consider 3.0 and 3 to be equal else where, it's a matter of consistency. Luc P. On Sun, 2 Oct 2011 12:29:01 -0700 (PDT) Chris Perkins <chrisperkin...@gmail.com> wrote: > Follow-up question: Can someone explain the rationale behind the > change to = semantics between integers and floating-point numbers? I > have read the design page ( > http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics), > but all it seems to have is this somewhat cryptic description: > > "It compares values in a type-independent manner, but not between > floating points and integer types. This allows numbers to be used as > map keys with correct semantics." > > I have been playing with floating-point map-keys in 1.2, trying to > find some behavior that seems like incorrect semantics, but I haven't > found anything odd. What sort of incorrect semantics is this change > trying to correct? > > - 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 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