4 ms·
The mistake of Knuth is instead of "Literate Programming", he made it, or at least let most people take it, into "Literate + Programming". Depend on which part
by hzhou321 5y ago
The mistake of Knuth is instead of "Literate Programming", he made it, or at least let most people take it, into "Literate + Programming". Depend on which part you focus on, it is either "code" with copious amount of "document", or "document" with verifiable "code". Many "literate" programs are in fact the former. The modern "Notebooks" are the latter*. Neither is "Literate Programming".
With "literate Programming", it is one product, the program! Ideally, it is just readable code, code that human can read literally. Since human mind works differently from computer, so the literate programming environment need transform the literate code into a form that compiler can optimize. I believe this idea is inside Knuth's LP. But early attempt is always limited by technology. For example, Knuth's system is based on token parser. Token is not the unit of comprehension for human. Thus he can't do much with the Pascal part other than "tangling" the code as is. Then he had to supplement his goal with English or "document". But if we start to develop the framework beyond "tangle",
we'll see a new page in literate programming.
* The "Notebooks" (the noun) implies we are emphasizing the product as documents. However, nothing prevent people to use "Notebooks" to program. Then immediately one will see how limited it is. "Notebooks" does not "tangle" code. Really, there is not much you can do with the code part. For example, try use the "Notebook" form on a C program.