3 ms·
I've seen similar defenses of Knuth over the years, but I'm still inclined to view this McIlroy's way. I think focusing on the shell script is a canard, the poi
by draw_down 7y ago
I've seen similar defenses of Knuth over the years, but I'm still inclined to view this McIlroy's way. I think focusing on the shell script is a canard, the point is he picked what seemed like the right tool for the job. Isn't that what commenters are saying here all the time?
Anyway, perhaps I just suffer from a failure of imagination, but I can't see why the "Blah"s interspersed with `foo`s and `bar`s is meant to be revelatory.
- CrazyStat 7y agoThe job Knuth was asked to do was "write a piece illustrating literate programming." A six line shell script is not the right tool for that job.
- mhd 7y agoI think it's meant to promote looking at how a literate programming system is mangling program output. It's way more complicated and powerful than just "inverted comments" (like e.g. CoffeeScript did in recent memory). Composite parts of the final program can be presented out of order, sent to different output files, etc. For something slightly more modern than this sample program or TeX, there's "A Retargetable C Compiler: Design and Implementation", which presentes the code of lcc, a quite conformant C compiler (which, IIRC, still enjoys some popularity on Windows). Sadly the strengths of literate programming are rarely useful for mere mortal programmers -- we're not often entrenched in deriving algorithms and/or presenting something in a didactic manner.