3 ms·
Literate programming is fine for done things - e.g. the sort of things you might put in a Jupyter notebook - maths, algorithms etc. For large normal programs t
by IshKebab 8y ago
Literate programming is fine for done things - e.g. the sort of things you might put in a Jupyter notebook - maths, algorithms etc.
For large normal programs though? I don't think you need that much prose. A program with 100k lines of code would become enormous.
Still, I do wish programming languages had better support for rich comments - why do no IDEs render comment blocks as markdown? Why can't I put diagrams in comments? I have to resort to shitty ASCII art like a commoner.
- taeric 8y agoOddly, large programs that won't change heavily benefit from the literate style. Almost as a forcing function to keep you from changing them. Not surprising, given Knuth's liking of stability.
- jf 8y ago> large programs that won't change heavily benefit from the literate style. This has been my experience. Returning to code I wrote as a literate document is a joy.
- slobotron 8y agoCheckout Dr Racket, I believe you can have images in the comments and even as part of code. https://docs.racket-lang.org/quick/ https://docs.racket-lang.org/quick/