5 ms·
> C was specified by K&R in 1978. No it wasn’t. K&R was far removed from many C implementations of the time, wasn’t ever written as a formal spec, and had gapi
by tatersolid 6y ago
> C was specified by K&R in 1978.
No it wasn’t. K&R was far removed from many C implementations of the time, wasn’t ever written as a formal spec, and had gaping holes of undefined behavior.
An educational textbook isn’t a formal language specification.
- aidenn0 6y agoC was the K&R book, PASCAL was the User manual and Report. These were the platonic ideals of the languages. The specification was the language, the fact that there was an implementation was a bonus. I never once in my comments above said "formal" so perhaps we are meaning two very different things by "specification." No version of Cs specification since K&R has done away with undefined, nor implementation defined behavior.
- tatersolid 6y ago> C was the K&R book How could this be when zero implementations behaved in accordance with K&R? The authors and fans may have claimed it as a “spec”, but it never was a functional “spec” in the real world.
- aidenn0 6y agoThat's the point. The language spec was the platonic ideal, and implementations were just imperfect realizations. There were actual languages that still have no implementations.