If I were to rewrite the C library and kernel from scratch, without
backwards compatibility, I'd fix many many things. But that train
passed many years before I was born.
Lightning will not strike in the same way again. But we are engineers.
We should not give in to despair. The rewards will be great if we can
replace C with a better language, or Linux (or *BSD) with a better
kernel. And if we can't do those things, we could still see some
substantial payoffs if we rewrite the C stdio and string libraries.
Korn and Vo pretty much did the former, and knowledge about how to do
the latter is getting better socialized, where it's more a matter of
consistently using improved functions of more recent vintage, and not
thoughtlessly recapitulating bad examples from days of yore.
The only thing worse than being Schlemiel the Painter is copying his
approach blindly.
For one example, we have stat(2) and stat(3type). Why did they
exploit the fact that C allows calling a function and a struct the
same?
C'mon, you know the answer already. It was less typing. :-|
One of the best lessons we can teach programmers of the post-Unix
generations is that you do not have to Huffman code everything at the
first opportunity, especially in a casual, ad hoc manner.