See also NOWEB, a system that developed the ideas of CWEB. Wrote my dissertation using it.<p><a href="https://www.cs.tufts.edu/~nr/noweb/" rel="nofollow noreferrer">https://www.cs.tufts.edu/~nr/noweb/</a>
I studied CWEB when I did computer science in the early 1990s (eek!).<p>While it is a way to document and compile your programs from a single file, it still contains the problem of where the story of a program should happen, and in keeping the documentation and code in line and up to date with each other.<p>It should also be understood that the documentation is for other programmers and not users, since the printout of the document includes the code in-line.
CWEB spawned several other Literate Programming systems, the main differences being in programming languages supported as well as how the documentation was formatted.<p>My favorite is nuweb <a href="https://nuweb.sourceforge.net/" rel="nofollow noreferrer">https://nuweb.sourceforge.net/</a> which allows for LP in virtually any language and provides documentation in LaTeX. The main trade off being that with wide language support the code sections are as-is, without special formatting. Since mostly people write the code sections to their own tastes already this is not a significant problem.
isn't the first problem of documentation is keeping it in sync with the source code? Time and time again people come up with "better ways of documentation" while neglecting this basic problem, what problem do they think they're solving?