Domain: literateprogramming.com
Stories and comments across the archive that link to literateprogramming.com.
Comments · 55
-
Nontextual programming languages
There's been lately a bit of discussion on non-text or non-linear programming languages; from purely visual programming languages like Jaron Lanier's Mandala to literate programming languages like CWEB, there seems to be a trend beyond ASCII-linear text programs. Your colorforth seems to be an effort in that direction
Question is: where do you think this field is headed? Will non-ASCII programing languages be niche players, or will some of them become as widely used as PERL or Java? Is there something fundamentally different you can do with non-ASCII PLs? Or something that you can't do with other programming languages, like C++?
PS: I had a glimpse of Forth ~20 years ago with a Forth interpreter for the ZX Spectrum, which beeped and printed color squares while it was interpreting stuff. Quite funny, indeed! Or maybe a harbinger of ColorForth... -
yes, it does
yes, and there's are a lot more literate programming tools around.
Personnly I'm charmed by Donald Knuth 's WEB, it uses TeX as a nice bonus. -
Re:practical experience implementing compilers??
Code-within HTML documenation is a good idea, and not a new one either. It is called Literate Programming. except usually the code is within TeX with a system called CWEB.
I believe your idea of sticking the code and documentation into XML is best however. Then, your code can live in a real database (instead of a CVS repository) and you could do much more powerful manipulations and queries of your code and versions. I use CVS all the time, but it is limited because it really does not know a language's structure.
It is the year 2001. Why do we still write code in plain text files?
-
Literal programming can automatically document
Literate programming was invented around 1983 by the very famous Donald Knuth, author of the TeX typesetting system and the multi-volume series The Art of Computer Programming. It is based on two important ideas.
The first idea is that good program documentation shouldn't be squeezed into little `comments'. It should be structured more like a technical article for a journal, and it should have all the support that a journal article usually gets, including good typesetting. The programmer should have the opportunity to annotate each section of the code with as much explanation as is necessary and appropriate.
Literate programming is so interesting because the documented parts of the program do not have to be in the same order as the program itself. Code can be written in whatever order is best for people to understand, and re-ordered automatically when the compiler needs to run the program.
Documentation can be typeset automatically using tools to extract the literate comments from the code. For more information on this, see:
-
Literal programming can automatically document
Literate programming was invented around 1983 by the very famous Donald Knuth, author of the TeX typesetting system and the multi-volume series The Art of Computer Programming. It is based on two important ideas.
The first idea is that good program documentation shouldn't be squeezed into little `comments'. It should be structured more like a technical article for a journal, and it should have all the support that a journal article usually gets, including good typesetting. The programmer should have the opportunity to annotate each section of the code with as much explanation as is necessary and appropriate.
Literate programming is so interesting because the documented parts of the program do not have to be in the same order as the program itself. Code can be written in whatever order is best for people to understand, and re-ordered automatically when the compiler needs to run the program.
Documentation can be typeset automatically using tools to extract the literate comments from the code. For more information on this, see: