Saturday, September 8, 2012

Experimenting Java library with Clojure

I'm reading Joy of Clojure. The book is a bit outdated in terms of library version. It was written when Clojure was at 1.2 but now Clojure is at 1.4 and 1.5 is development.

In one section of the book, it explains that we can easily use function show in clojure.contrib.repl.utils to display document of Java library but that was for Clojure.

According to Where Did Clojure.Contrib Go, show moved to clojure.reflect/reflect. Let play with it a little bit.

Pretty handy.

Note: you also can open Javadoc in browser with this snippet
(javadoc java.lang.Math)

No comments:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...