Reserved names in ANSI C

Martin Minow minow at mountn.dec.com
Fri Jun 23 05:18:56 AEST 1989


In article <884 at cbnewsl.ATT.COM> dfp at cbnewsl.ATT.COM (david.f.prosser) writes:
>
>>When I complained about this in one of the public reviews, I was told that
>>this was for "Posix compliance."
["this" refers to namespace pollution"]
>
>I don't know what particular item you are referring to here, and the answer
>of "Posix compliance" cannot by itself be an X3J11 motivation.

>From X3J11/87-207, page 17 (responses to first public comments):

  Summary of issues: Add leading underscores to names in <limits.h>

  Committee Response:  This proposal would invalidate too much existing
  source code.

  Many of these names were chosen to agree with other standards.  Despite
  a number of comments on this issue, the Committee stands by its decision
  to adhere to the names specified in both the /usr/group Standard and
  IEEE Std 1003.1 (POSIX).

------

The committee *could* have defined all library names using leading
underscores and included a suggestion that vendors supply a <posix.h>
or similar to map Ansi names into "existing practice."  (This may also
solve the 6-character monospace problem).

I continue to have difficulty writing transportable programs when well-meaning
implementors use useful words (such as "line" in one vendor's Macintosh
C library).  Since there is only one Ansi Standard and, hopefully, many
people writing code to that standard, I wish the Committee had found
way to prevent the C-implementation namespace from growing without bounds.

Martin Minow
minow%thundr.dec at decwrl.dec.com



More information about the Comp.std.c mailing list