Interview Transcript – Donald Knuth [pdf]
Having never heard of literate programming, I started poking around.<p>"Physically Based Rendering"'s intro to literate programming can be found here: <a href="http://www.pbr-book.org/3ed-2018/contents.html" rel="nofollow">http://www.pbr-book.org/3ed-2018/contents.html</a> (chapter 1.1)<p>And then answering my own first question about this: how is this different from copious comments? (Source: Wikipedia)<p>> Literate programming is very often misunderstood[12] to refer only to formatted documentation produced from a common file with both source code and comments – which is properly called documentation generation – or to voluminous commentaries included with code. This is the converse of literate programming: well-documented code or documentation extracted from code follows the structure of the code, with documentation embedded in the code; while in literate programming, code is embedded in documentation, with the code following the structure of the documentation.<p>> This misconception has led to claims that comment-extraction tools, such as the Perl Plain Old Documentation or Java Javadoc systems, are "literate programming tools". However, because these tools do not implement the "web of abstract concepts" hiding behind the system of natural-language macros, or provide an ability to change the order of the source code from a machine-imposed sequence to one convenient to the human mind, they cannot properly be called literate programming tools in the sense intended by Knuth.[12][13]<p>I was then curious if any tooling has been created for literate programming in TypeScript. I haven't given a close look yet, but here are some relevant links:<p>- <a href="https://github.com/microsoft/TypeScript/issues/31364" rel="nofollow">https://github.com/microsoft/TypeScript/issues/31364</a><p>- <a href="https://johtela.github.io/litscript/" rel="nofollow">https://johtela.github.io/litscript/</a><p>- <a href="https://mistlog.github.io/ray-tracing/index.html" rel="nofollow">https://mistlog.github.io/ray-tracing/index.html</a>