6 char externs and the ANSI standard

Gordon Davisson gordon at uw-june
Wed Oct 10 11:34:23 AEST 1984


I think you should definetly have the standard allow long external variable
names. Limiting them to 6 characters would have a number of bad effects:

  1) Compiler writes would follow the standard. This means that there
     would be even more obsolete implementations out there next time
     someone designs a language, and they'll have to deal with this
     question all over again. The 6 character limit is older than I am,
     and it's high time it was retired.

  2) Compiler writers would *not* follow the standard. The problem with
     this is that everyone will violate it in a different way. Some
     compilers will support 31 char limits, some 64, some 255. In other
     words, the standard will not be used and would therefore be a
     failure. This is not nearly as serious as 1, but it is a problem.

  3) Programmers would follow the standard. This leads to unreadable,
     unmaintainable, and generally ugly programs.

  4) Programmers would *not* follow the standard. Since 6 character
     variables are such a pain in the *ss, programmers using extended
     compilers will tend to take advantage of the ability to use
     understandable names, and proceed to write non-portable programs.

The main problem with long externs is that some compilers will have to
work with existing linkers that can't handle long names, but I think the
best way to deal with this is to define a "standard subset". I don't
want to see such limited compiler/linker setups advertised as "Full
ANSI C" as if they weren't 10 years out of date.

--
Human:    Gordon Davisson
USnail:   5008 12th NE, Seattle, WA, 98105
UUCP:     {ihnp4,decvax,tektronix}!uw-beaver!uw-june!gordon



More information about the Comp.lang.c mailing list