Arnt Gulbrandsen
About meAbout this blog

Literate programming failed. Why?

Donald Knuth invented literate programming and published the TexBook as an example. The book is great, or so I've heard from many people who've read it. So why is literate programming is practically unused today, at least the kind Knuth invented?

(Something else is used, namely the kind of API documentation made popular by Doxygen and used more or less well by a lot of people. I have strong opinions about that, but this post is about the demise of Knuth's invention.)

The Wikipedia article on literate programming says, in part, that it represents a move away from writing programs in the manner and order imposed by the computer, and instead enables programmers to develop programs in the order demanded by the logic and flow of their thoughts. Literate programs are written as an uninterrupted exposition of logic in an ordinary human language, much like the text of an essay.

Today's major programming languages allow most of that already: In java, for example, you can call a function before the compiler has seen that function's signature. The rest is about writing a lot of text. I can't imagine any programming team I've seen would write an uninterrupted exposition of logic in an ordinary human language with any efficiency, particularly not a big, somewhat modular program.

I like blogging. I started this post with half an idea and not many minutes later, everything was clear. But I do want to reread some LP books and see what I think can be transferred.