5 ms·
I'll be eager to read that when you're done. I doubt I'll agree with your thesis, but still :-) I just went and skimmed the forward from an early version of "
by xscott 4y ago
I'll be eager to read that when you're done. I doubt I'll agree with your thesis, but still :-)
I just went and skimmed the forward from an early version of "The C Programming Language" book [0]. There's certainly mention of writing portable programs, but UB as a device doesn't seem to be in there. And who knows what passed for "portability" in the early 70s - with enough preprocessor conditionals, you could have completely separate programs in the same file.
> I'm going to see if I can track down some old C committee members
I'll be interested in what they say, but any committee of more than one person is going to have varying beliefs and motivations. I'm sure you wouldn't do this, but it'd be possible to emphasize the examples that support your position while neglecting other view points.
I also hope you'll at least consider Dennis Ritchie's perspective on the topic. Since he created the language, I think his opinion should carry more weight than most others. I haven't tracked the whole history of how "noalias" became "restrict", but he pretty clearly thought "noalias" was an "abomination" that created "hash of apparently safe programs". [1] At the very least, I think it shows he was opposed to making "hash" in the name of optimizations.
I had no idea this debate has been going on since 1988. I guess compiler writers have been insane for much longer than I knew.
[0] https://archive.org/details/TheCProgrammingLanguageFirstEdition/page/n9/mode/2up https://archive.org/details/TheCProgrammingLanguageFirstEdit...
[1] https://groups.google.com/g/comp.lang.c/c/K0Cz2s9il3E/m/YDyo_xaRG5kJ https://groups.google.com/g/comp.lang.c/c/K0Cz2s9il3E/m/YDyo...