3 ms·
Not an equivalent of literate programming. Here you can jump to arbitrary files at arbitrary points, in literate programming your code must flow from top to bot
by methyl 6y ago
Not an equivalent of literate programming. Here you can jump to arbitrary files at arbitrary points, in literate programming your code must flow from top to bottom linearly, which is most of the times impossible to achieve.
- qbasic_forever 6y agoNo not with Knuth's original ideas for literate programming and cweb. There's an explicit abstraction between the location of prose and the final source code output and they can be woven in any way the author desires. You can even insert intermediate steps, like pseudocode that show building up the architecture in small incomplete steps, and all of that is removed entirely from the final source code result. It is actually quite complex and why more modern literate programming systems ditch it and basically turn into fancier comments.
- methyl 6y agoSure, I get your point, but this description stands in opposite to previous statement that “tour content lives inside the code as comments”. It seems to me that CodeTour is very close to Knuth’s idea.
- qbasic_forever 6y agoI recommend reading up on cweb and its history. The tangling and weaving metadata and prose lives in the code with special fenced blocks. Noweb is a modern version of it: https://github.com/nrnrnr/noweb https://github.com/nrnrnr/noweb (but it's not really used or maintained much anymore)