After playing with Clojure for a little while, one feature that I really like about it is doc and doc-strings, which work just like doc-strings in Emacs Lisp. I can use find-doc and ns-publics to find or explore the available symbols. I'm sure that an emacs mode or an IDE could make the interface as nice as the Emacs Lisp interface, but the functionality is there.
In Java, I often use javap to see what the method signatures of a class were, and have sometimes wished that the Javadoc were also available in the same way. The Java compiler could have put the Javadoc in attributes in the class files, which would then be available to tools like javap.
When using hugs or ghci for Haskell, I like using :browse and :info. The name and type almost always is enough to convey what a function does. It would be nice to have a short description of relevant information not captured by the name and type, but that's somewhat rare.
In any case, if I really needed to, documentation for the standard libraries for all three of these languages are available online. For Clojure and Haskell, the source code is available. For Java, the class files can be disassembled, though the occasional native method would remain opaque.
I find Clojure compelling in a way that I do not find Python compelling. They are both dynamically typed, which is a minus to me for both. I'm neither drawn to nor repelled by the syntax of either. However, I like feel of the immutable data structures of Clojure better than the data structures of Python. I'm also going to play around with integrating Clojure code with Java code. And while I haven't explored multimethods or any concurrency features, I can see learning new concepts, perhaps even learning when volatile would be useful when writing in Java, when looking into them.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment