Re:Best aspects of C
by wool_gather on Tuesday November 17, 2020 @11:46AM
(#25125885)
...? `yes` is not part of the C standard library.
[ Parent
| on HN ]
I think they meant to draw attention to the implementation of `yes` to showcase crustiness the C stdlib imposes on even a trivial program.
But of course GNU is kind of notorious in this regard. Compare their `yes` to OpenBSD's. It's night and day.
https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c
It's not that GNU is incompetent or overly bureaucratic or anything. It's that they really didn't want to infringe on Unix, and they presumed that Unix's yes would have been implemented in the most obvious, dead-simple way. And, as a plus, GNU yes can stream y's at like 10 GB/s, if you need that.