Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!cmcl2!brl-adm!umd5!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.lang.c Subject: Re: Help wanted on avoiding name space pollution Message-ID: <8080@elsie.UUCP> Date: 5 Jun 88 15:02:14 GMT References: <8079@elsie.UUCP> <8008@brl-smoke.ARPA> Organization: NIH-LEC, Bethesda, MD Lines: 52 > There wouldn't be much point in specifying what names are reserved > unless the remaining names were unreserved. I think the committee > felt that that implication was clear enough. Perhaps this is a matter of knowledge, simple-mindedness, and/or training. Doug, who has been active with the committee, may know from its deliberations that the committee's purpose in describing reserved identifiers was to say that all other identifiers are unreserved. I, a simple-minded Norwegian-American, assume that the committee's purpose in describing certain identifiers as reserved is to let me know that those identifiers are reserved. If the commiteee wants me (at least) to glean further information from the standard--for example, to conclude that it has provided a complete description of reserved identifiers--it needs to let me know that it has provided a complete description. The suggested addition-- Only external identifiers and macro names described in the Standard as reserved shall be reserved. --would be a way of doing this. As to training: my logic training was that if the Standard says that "Labradors are dogs," says that "Collies are dogs," and says nothing about poodles, it is unsafe for me to conclude that the Standard means to say that "Poodles are not dogs." Similarly, if the Standard says that "Identifiers in headers are reserved," says that "Identifiers beginning with 'is' are reserved, and says nothing about identifiers that begin with "xt", it is unsafe for me to conclude that the Standard means to say that "Identifiers that begin with 'xt' are not reserved." Doug seems more conversant with "fuzzy logic" than I am; are its teachings different in this matter? Are there changes I can make to my comment that will improve it with regard to this point? > I also fail to see how an implementation could qualify as conforming > if it usurped unreserved names. It certainly could NOT "accept any > strictly conforming program" as required in section 1.7. Well. . .Section 4.1.2 says that "If [a] program defines an external identifier with the same name as a reserved external identifier, even in a semantically equivalent form, the behavior is undefined." And Section 1.7 says that "A strictly conforming program. . .shall not produce output dependent on any unspecified, undefined, or implementation-defined behavior." So if Microsoft (purely for the sake of example) chooses to say that "os2" is a reserved external identifier, then any program that uses "os2" has undefined behavior (according to Section 4.1.2) and so cannot be "strictly conforming" (according to Section 1.7). Microsoft *does* accept any strictly conforming program-- since any program that uses "os2" isn't strictly conforming, at least by Microsoft's lights. Are there changes I can make to my comment that will improve it with regard to this point? -- ado@ncifcrf.gov ADO is a trademark of Ampex.