Clojure 1.2 RC2

2 views
Skip to first unread message

Stuart Halloway

unread,
Aug 6, 2010, 7:11:31 PM8/6/10
to clo...@googlegroups.com
Clojure 1.2 RC 2 is now available, along with a corresponding Clojure Contrib, at:

http://clojure.org/downloads

There is one important change since RC1. Record/map equality is now symmetric in all cases. There are two
variants:

  * In most cases, you should use =. Calls to = include type
    information, so instances of different record types can never be =
    to each other, or to plain maps.

  * Calls to .equals are different. They respect the Java semantics
    for maps, which is a requirement for correct interop. Type
    information is *not* included, so any kind of map can be .equals
    to any other.

Possible impacts for your programs:
  
  * If you create a custom implementation of Clojure's IPersistentMap,
    you probably want it to be able to be = to other maps. If so, all
    you need to do is implement the marker interface
    clojure.lang.MapEquivalence. Note that APersistentMap does this
    for you.

A full list of changes is available at

http://github.com/clojure/clojure/blob/1.2.x/changes.txt

For maven/leiningen users, your settings to get the beta from build.clojure.org/releases are:

 :dependencies [[org.clojure/clojure "1.2.0-RC2"]
                                     [org.clojure/clojure-contrib "1.2.0-RC2"]

To everyone who has contributed to 1.2, many thanks!

Stu
Reply all
Reply to author
Forward
0 new messages