by avar · 9y ago · 0 comments
The long-standing advice when writing GNU utilities used to be that if the program you were replacing was optimized for minimizing CPU use, write yours to minimize memory use, or vice-versa. Or in this case, if the program was optimized for simplicity, optimize for throughput.
It would have been very easy for the nascent GNU project to unintentionally produce a line-by-line equivalent of BSD yes.c, which would have potentially landed them in the 80/90s equivalent of the Google v.s. Oracle case.
https://www.gnu.org/prep/standards/standards.html#Reading-No...
(Lately I've been really tempted to pull a Cato and start terminating my every HN post with "C delenda est." https://en.wikipedia.org/wiki/Carthago_delenda_est)
https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f46...
https://github.com/coreutils/coreutils/commit/35217221c211f3...
But see the post of belorn where he argues that the error handling seems to be good.