What namespaces are available?

Tim McDaniel mcdaniel at uicsrd.csrd.uiuc.edu
Fri Mar 10 10:17:01 AEST 1989


In article <11982 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
>Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
>	_[a-z0-9][_A-Za-z0-9]*	what I called semi-reserved

I finally located a reference in K&R 2nd edition (p. 241):
    External identifiers that begin with an underscore are reserved
    for use by the library, as are all other identifiers that begin
    with an underscore and an upper-case letter or another underscore.
(Of course, I couldn't find any references to this in the index, or in
the "A2.3 Identifiers" section of the reference manual .... *sigh*)

So, were K&R simplifying the issue, or did X3J11 change its mind after
K&R2 was published, or what?  (Note that I exclude the possibility of
Karl being wrong.  8-)

Assuming that there is "semi-reserved" namespace: what's the point of
separating the namespaces to avoid namespace pollution, and then
designating a polluted namespace?

If I'm writing a pANS C program, I have to avoid semi-reserved names,
because my implementation might be using them.  If I'm writing a
decent implementation for pANS C, I have to avoid using semi-reserved
names, since a pANS C program might be using them, and I need to avoid
gratuitous breakage.

Therefore: semi-reserved names are, in practice, completely useless.

--

             Tim, the Bizarre and Oddly-Dressed Enchanter

Center for      |||  Internet, BITNET:  mcdaniel at uicsrd.csrd.uiuc.edu
Supercomputing  |||  UUCP:     {uunet,convex,pur-ee}!uiucuxc!uicsrd!mcdaniel
Research and    |||  ARPANET:  mcdaniel%uicsrd at uxc.cso.uiuc.edu
Development,    |||  CSNET:    mcdaniel%uicsrd at uiuc.csnet
U of Illinois   |||  DECnet:   GARCON::"mcdaniel at uicsrd.csrd.uiuc.edu"



More information about the Comp.std.c mailing list