3 ms·
"Does writing a doc-string for each class/method/function and connecting to readthedocs count as literate programming?" I don't think so. It's like comparing t
by js8 10y ago
"Does writing a doc-string for each class/method/function and connecting to readthedocs count as literate programming?"
I don't think so. It's like comparing the Lord of the Rings, the novel, with the index that contains descriptions of all the characters in the Middle Earth.
I mean both tell you the same story, but from a very different perspective.
I am personally not a fan of (what I understand as) literate programming, unless you are writing a piece of educational code that is supposed to be read from beginning to end (like Jones Forth, for example).
What I think should be done instead, the code should be documented on several levels, each level more detailed by a constant factor. So each couple lines should have a comment, each function should have a comment what it does with what parameters, each class (or group of functions) should have a description of their purpose, each module should have a description of its architecture and interactions, and so on until you would get to the top level architecture. So it would be more like a tree of more and more detailed documentation rather than linear novel that you read from start to end.