3 ms·
An interesting exercise would be to actually maintain both versions: e.g. make utf-8 friendly; add error handling. I think McIlroy's version would still come ou
by emmelaich 15y ago
An interesting exercise would be to actually maintain both versions: e.g. make utf-8 friendly; add error handling.
I think McIlroy's version would still come out on top but not by as much.
Nice, informative error handling is one of the things most lacking in shell scripts.
- 4ad 15y agoIt was fixed in Plan9, where programs return error strings, not numbers, the shell (rc) is better and errors are not lost in pipelines. And UTF-8 was invented by Ken Thompson and Rob Pike while working on Plan9.
- emmelaich 15y agoYes, I'm aware of plan9. The 'what constitutes a word' and the error handling were and are the more interesting improvements.