3 ms·
K&R corresponds to C in 7th Edition Unix. The source code to v7 and other early Unix versions is browsable at: http://minnie.tuhs.org/cgi-bin/utree.pl http://mi
by bbanyc 11y ago
K&R corresponds to C in 7th Edition Unix. The source code to v7 and other early Unix versions is browsable at: http://minnie.tuhs.org/cgi-bin/utree.pl http://minnie.tuhs.org/cgi-bin/utree.pl
I find it interesting to see what C was like even earlier. Notably there was an incompatible break between the 6th and 7th editions, when the compound assignment operators were flipped. It used to be "=+" instead of "+=". I guess Ritchie figured it'd be better to avoid ambiguity with expressions like "x=-1;".
- vbezhenar 11y agoJust imagine those changes in modern language. Breaking changes, oh my god, I have to rewrite my software, no way I'll ever use that language again. People were more patient at that time.
- Someone 11y agoI would think it was more because it was way simpler to adjust software. People mostly used their own software, they didn't have millions of lines of code hanging around (they probably could grep all existing source code in a few hours, if needed), the authors of any software that needed changes all were available, often in the same room, and even if the languages didn't change, they would have to update their programs because they made breaking changes to their OSes every day (that may be slightly exaggerated) Also, what language would you switch to on your Unix installation?
- rootbear 11y agoYes, that is the primary reason they were flipped. Typing x=-42; when you meant x= -42; was just too easy. I know. I did it. Similarly, as I recall, variable initialization of the form int i 17; created some sort of parsing problem and was changed to the current form int i = 17; I learned Unix on a PDP-11 running v6 and I had to learn all of the changes when we got 32V for the new VAX.