3 ms·
There is no single way to do literate programming. Certainly Knuth's approach is getting a bit long in the tooth. Personally, I simply write a document using
by CyberFonic 7y ago
There is no single way to do literate programming. Certainly Knuth's approach is getting a bit long in the tooth.
Personally, I simply write a document using MarkDown and then extract the source code from the generated <code> blocks in the HTML output with a simple script that adds some boilerplate which renders the source code compliant with my in-house standards.
I also find that I write the document (specification) first and then extract the code from that. I have never written algorithms first and then translated them to literate programming structure. If it is a program first, then I simply add comments that will allow me to understand the code months / years down the track. If there are a bunch of files then I will often have a README.md file in the directory which provides some very high level details.
- Jtsummers 7y agoWhat do you mean "Knuth's approach is getting a bit long in the tooth"? Do you mean his toolset?