Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c Subject: Re: lint, pointers, 0 (what else?) Message-ID: <454@rlgvax.UUCP> Date: Sat, 9-Feb-85 14:37:30 EST Article-I.D.: rlgvax.454 Posted: Sat Feb 9 14:37:30 1985 Date-Received: Mon, 11-Feb-85 04:48:27 EST References: <366@harvard.ARPA> <8094@brl-tgr.ARPA> <374@harvard.ARPA> Distribution: net Organization: CCI Office Systems Group, Reston, VA Lines: 30 > 'C' *is* ruined in that way that the kind of integer that can hold a > pointer is not pre-defined. I agree 100%. That's the disadvantage of a language that "jes' growed", like C (the advantage is that you aren't stuck with incorrect decisions made when the language was cast in concrete). The fact that it does quite well, even given its limitations, is a testimonial to the parts of C that they got right (C here referring to all post-V6 C's; the C that came with V6 was inadequate, given the lack of "unsigned" and "long"/ "short" modifiers, etc.). > > > The way K&R intended (and partially documented it). > > > > It isn't clear that they ever intended it to work this way. > > Ok, I don't know whether K&R *intended* to work '0' as the nil pointer > on function call. Looking at 'stdio' and at V7 UN*X programs I just > can't help getting that impression, though. K&R didn't write most of that code, and what they did write may have come before they thought about the nil pointer question. Heck, they changed their minds when confronted with new data - "-=" disappeared when it was realized that "a=-b" was ambiguous (and now "=-" is gone from the language). Lots of UNIX code has gotten cleaner (at least with respect to type-correctness) as time has gone on - as of 4.2BSD and System V, the code is lots better. (A lot of System V looks as if somebody at least tried to "lint" most of the commands.) Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy