| > The goal wasn't an optimal algorithm or minimal resource consumption - the goal was to demonstrate the value of literate programming on a small data processing problem. No. You obviously still haven't read the column and the article that explained what the goal actually was. The actual goal was to demonstrate Knuth's WEB system, which was explicitly made only for Pascal in 1986. That was what Bentley asked Knuth to do (quoting from the article "Programming pearls: literate programming", Communications of the ACM, Volume 29 Issue 5, May 1986 Pages 384-369): "for
the first time, somebody was proud enough of a substantial
piece of code to publish it for public viewing,
in a way that is inviting to read. I was so fascinated
that I wrote Knuth a letter, asking whether he
had any spare programs handy that I might publish
as a “Programming Pearl.” But that was too easy for Knuth. He responded,
“Why should you let me choose the program? My
claim is that programming is an artistic endeavor
and that the WEB system gives me the best way to
write beautiful programs. Therefore I should be able
to meet a stiffer test: I should be able to write a
superliterate program that will be noticeably better
than an ordinary one, whatever the topic. So how
about this: You tell me what sort of program you
want me to write, Crin d I’ll try to prove the merits of
literate programming by finding the best possible solution
to whatever problem you pose’--at least the
best by current standards.”" So, in the context of demonstrating Knuth's WEB on the substantial piece of code, the modification of the request was only that Knuth wasn't allowed to use the program he already wrote, but that he had to write a new one! (So the starting goal was in effectively all the premises exactly the opposite of what McIlroy then showed!) So the goal was to write and present a wholly new program in Knuth's WEB, which, under the standards of evaluation of the quality of the solution as widely accepted by computer scientists, would be "the best solution." Which is exactly about the optimality of the algorithms, resources use etc. If you still don't fully appreciate the context of the Knuth's program, do search for all the other columns and computer science books written by both Bentley and Knuth -- the topics of both were never "how to use existing programs" but how to develop/use the best algorithms. |
> You obviously still haven't read the column and the article that explained what the goal actually was. ... > do search for all the other columns and computer science books written by both Bentley and Knuth
Since this is public, I'll conclude by noting here that I had indeed read both of the articles, and a bunch of other text by both Bentley and Knuth besides. (In fact, the Programming Pearls books are particularly high on my list of recommendations...)