3 ms·
That exchange was always odd. Knuth was showcasing a style of programming. McIlroy was solving the problem. That is, the critique was somewhat orthogonal. H
by taeric 9y ago
That exchange was always odd. Knuth was showcasing a style of programming. McIlroy was solving the problem.
That is, the critique was somewhat orthogonal. He even agreed that it was a great exposition of the data structure used. What he feared, was it would bias people to overly complicated programs. Instead of solving problems, they would craft elaborate solutions.
And to a large extent, this is somewhat appealing. It is a large part of my fear working with some folks elaborate abstractions in code I deal with. Sometimes, they are absolutely needed. Often, they are not.
For pedagogical reasons, literate programming is tough to beat. Look up wc done literately. Quite easy to read. Even Knuth's programs are easier to read than you would think. Helped in large by his style.
- whipoodle 9y agoI disagree. You would only think the actual implementation is an implementation detail if you don't have to ship things, as academics like Knuth don't. There is more to learn from it than just that, but I think that's a clear point here.
- taeric 9y agoI'm not sure I follow your point. What do you disagree with from what I said? The task given to Knuth was to display literate programming using a somewhat toy program. He did so. McIlroy showed how to solve the toy program. Oddly, Knuth's is the one I would reach for as part of my program. McIlroy's is the one I use interactively all the time. Literally last week I did basically that pipeline in my shell about ten times during log dives. If I found that elastic search or some other tool was doing something like that pipeline on my queries, I would be rather unhappy. Not to mention I would find a hella easy speed up by rewriting it. That said, I am now highly interested in benchmarking those two programs. Would be curious to see the results, if someone else already has.