3 ms·
Dennis Ritchie, in his paper about the history of C, explains that they became aware of these ambiguities only after the first C implementation, but they consid
by adrian_b 5y ago
Dennis Ritchie, in his paper about the history of C, explains that they became aware of these ambiguities only after the first C implementation, but they considered that it was a too big mistake, so they reversed the order in the next C version.
- Taniwha 5y agomaybe not quite the next version, from memory (and I ported compilers, and the kernels, for both) it was between v6 and v7 Unix
- dn3500 5y agoThat's correct, it wasn't the next version of the Ritchie compiler, it was a whole new compiler, the Portable C Compiler. It used yacc to generate the parser, and yacc complained about the ambiguity. They left the old syntax in for quite a while.
- Taniwha 5y agoYup, almost certainly PCC - which also still has struct fields in a global namespace as a (possible wonderful, possibly horrible) hack to provide the equivalent to unions