3 ms·
That exchange never sat right with me. I feel, and I hope Dr. Knuth would agree, that literate programming is a good choice for writing `uniq`, that the proble
by samatman 9y ago
That exchange never sat right with me. I feel, and I hope Dr. Knuth would agree, that literate programming is a good choice for writing `uniq`, that the problem domain was chosen for didactic reasons.
In effect, he chose to show off parts of several programs, rather than finishing one. The intention was to teach.
That shell script was a tour de force at the time, showing off the Unix Way of small, sharp, composable tools. What Dr. Knuth was (and is) saying: write those small, sharp tools in a literate manner. A real missed opportunity.
- svat 9y agoIndeed, yes exactly. And in fact, later Knuth wrote `wc` (one of the shell programs in the pipeline) as a literate program, and showed that it was better as a result than the one that came with Unix.