Hacker News new | ask | show | jobs
by mattdeboard 5052 days ago
Well now, I love Clojure and write it for my hobby projects, but I have to disagree about the online documentation for it. Every command is documented, sure, but that doesn't make it excellent. For example, here's the doc for the `with-open' macro:

"bindings => [name init ...]

Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order."

I deliberately chose a bit of code that's actually pretty simple and straightforward; also, one that I know intimately. Now, knowing what `with-open' does as well as I do, this doc string almost makes sense on the first pass. But to the layman this is almost impenetrable. I've written a couple variants of this macro and I STILL have to read the docstring a couple of times to understand what it's saying.

The online docs are comprehensive but I would never use the term "excellent" to describe them.

1 comments

Good point. The clojuredocs version[1] is a bit better, but you're right, it could be better.

[1] http://clojuredocs.org/clojure_core/clojure.core/with-open