user=> (= 23.0 23) false user=> (= 23 23) true
"compares numbers and collections in a type-independent manner" This kind of breakage was probably to be expected with the numerics changes in 1.3. I am also interested in this. On Oct 1, 4:34 pm, Chris Perkins <[email protected]> wrote: > I am trying to upgrade some code to 1.3, and I'm not sure how to do the > equivalent of a 1.2-style equality comparison. > > user> (= {:foo 23} {:foo 23.0}) > false > > This used to be true. I see that = is now documented to compare same-type > numbers only, but == can be used for 1.2-compatible comparisons. However: > > user> (== {:foo 23} {:foo 23.0}) > ; Evaluation aborted. > > == only seems to work on numbers. > > How can I upgrade code that expects 1.2-compatible equality comparisons? Or > do I need to change my expectations of what is considered equal in clojure? > > - Chris -- 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
