5

I am reading "Programming Clojure", and this book is based on clojure 1.1.

I want to use the latest stable version, 1.3, but it does not have old clojure-contrib.

My problem is that I cannot find import-static in clojure 1.3. I could copy the macro definition from old clojure-contrib and run.

Is there import-static or some substitute in clojure 1.3? Are there knowhows to find out such libraries and functions in old clojure-contrib for 1.3?

  • 1
    The second edition of Programming Clojure which uses 1.3 is currently in beta: http://pragprog.com/book/shcloj2/programming-clojure – Adrian Mouat Oct 25 '11 at 09:18

1 Answers1

4

You can find the updated locations here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

As for import-static, it hasn't been moved over. That said, it will run on 1.3. without any modification, so you can just copy the code: http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/import_static.clj

Alex Taggart
  • 7,805
  • 28
  • 31
  • 1
    Thanks. Packages that not listed in "Where did clojure.contrib go" are usable as it is in clojure 1.3, right? –  Oct 24 '11 at 23:43
  • It's likely that older libs will work with 1.3. There are some areas where backwards compatibility has been broken, e.g., numerics, rebinding vars without `:dynamic` metadata. – Alex Taggart Oct 25 '11 at 00:12