Re: Usage docstrings as example source & test samples

2014-06-16 Thread Mike Thompson
Tim Peters invented the idea of doctest in python. He had a great love of using the REPL (sound familiar to anyone in Clojure?). He felt that "throwing away" a constructive REPL session was a huge waste. He'd often tested some code via the REPL, particularly the edge cases. His REPL work,

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Vladimir Bokov
BTW, just searched through topics and found these about obsolete docstrings: core.match incorrect docstring? https://groups.google.com/forum/#!searchin/clojure/docstring/clojure/sC16eTtVaCQ/bXC0e91wx_gJ docstrings of if-let and when-let incorrect https://groups.google.com/forum/#!searchin/clojure

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Andy Fingerhut
Vladimir, I would be happy to review anything you care to write in this area. I would recommend that you start by assuming that whatever you produce might not be incorporated into the Clojure core code base. Assume that it will be distributed as a separate project, perhaps something like thalia,

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Vladimir Bokov
Thanks for reply, thalia looks very close for what i'm looking for, and i find cool being able to inject arbitrary docstrings :) But there is always some kind of unc

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Andy Fingerhut
I cannot answer for the Clojure core committers, but from past experience it seems unlikely that they will enhance the doc strings in the way you suggest. Fortunately, it is not true that "this decision must be taken by core committers". Anyone can add one dependency in Leiningen and replace all

Usage docstrings as example source & test samples

2014-06-16 Thread Vladimir Bokov
Hi, I'm quite new to clojure community, came from Python & Ruby. I see the most relevant documentation for the language is kept at http://clojuredocs.org/ I like examples listed there and idea of docstring, upon which some docs are generated. But, honestly, adding examples to docs by hand, updat