[TUHS] Literate Programming (was Comments in early Unix systems)

arnold at skeeve.com arnold at skeeve.com
Fri Mar 23 02:30:05 AEST 2018


Doug McIlroy <doug at cs.dartmouth.edu> wrote:

> Knuth offered the remedy of "literate programming", which
> might help in academic circles. In business, probably not.

IMHO this is too bad. Code I've written using LP is generally 
more correct earlier on than otherwise. And it's very enjoyable
to write code and explanation at the same time; I feel like I'm
talking out loud directly to my reader, a person, and not just
coding for myself or the compiler.

Significant proofs by example are Knuth's TeX and MetaFont,
and the lcc compiler by Dave Hanson and <I forgot>.

Shameless plug: I have written a small LP system in gawk designed
for use with the Texinfo markup language. It is written using itself.
I have written two other good size awk scripts using it as well.
I think it will scale well to larger stuff in C or C++ but simply
have not had an opportunity to use it for anything like that yet.

See https://github.com/arnoldrobbins/texiwebjr if interested;
and feel free to follow up privately instead of on the list to keep
things on topic.

Thanks,

Arnold



More information about the TUHS mailing list