Having come across mentions of it and seen pages of Knuth’s work, I became curious about literate programming. For those who have not come across it before, literate programming (LP) is an approach that mixes code in with extensive documentation to create something that is human readable and similar to a book.
So far I’ve encountered no instances of people using literate programming when writing PHP. Do you know of any?
4 comments ↓
Any time you see code with PHPDoc comments, that is a tribute to Knuth’s literate programming.
Though what is missing is a processing program for Knuth’s TeX files. To really produce book format. If you look at cweb’s output you will see what I mean.
It might be best to extend cweb to handle php code too.
I could do that job, but not without some donations, since I need to eat some pizza while coding this.
If interested, mail to ikrabbe . ask (at) web . de
bye ingo
My suggestion is that instead of Knuth’s weave that targets TeX, write the program to target HTML so the manuscript is written in English, HTML and PHP.
PHPDoc is an API documentation process not literate programming. This is something that you would want in your Eclipse or other IDE.
Check out noweb. It is a language agnostic version of cweb. So it can work with any programming language. Also it can create HTML output besides LaTeX. I like LaTeX because it can be turned into a PDF pretty easily.
Leave a Comment