ANSI C

Henry Spencer henry at utzoo.UUCP
Sun Jul 8 10:11:41 AEST 1984


Mike Caplinger observes:

   I can't believe that somebody is proposing ANOTHER standard that imposes a
   6-character uniqueness limit on external names!  How much longer are we
   going to be stuck with somebody's 1960s linker implementation choice?
   
   If ANSI got real and made the names of reasonable length, maybe that would
   force some of these sleazy people to write a real linker!

The 6-character uniqueness limit is not being "imposed" by the standard;
it is already imposed by dozens of linkers in use at tens of thousands
of sites.  This is (a) most unfortunate, but (b) extremely hard to fix.
Many, many C users work on systems which are constrained to be backwards
compatible with "somebody's 1960s linker implementation choice" forever,
or very nearly so.  It is a fact, regrettable but unavoidable, that C
programs which need more than 6-characters-monocase to distinguish among
their external identifiers are not portable, period.  This is not going
to be changed by wishing it away.  The ANSI folks have chosen to recognize
this fact rather than ignore it.

There is a fundamental question of standards politics here:  should the
standard attempt to tidy up and codify existing stuff, or should it try
to change the world by inventing all kinds of new goodies?  The problem
with the latter approach is that it's hard to stop the standards group
once they've got the bit between their teeth, and the result is often
nearly unrecognizable.  WE DON'T WANT THIS TO HAPPEN TO C!!  Many people,
including me, breathed a sigh of relief when it became clear that the ANSI
C people were taking the conservative but safe path of deferring to reality
rather than defying it.

These things are always compromises.  People in an environment with fairly
controllable software will probably have either 31-character external names
(consistent with the internal names) or unlimited-length external names
fairly soon.  Folks in environments with uncontrollable software won't be
able to upgrade, and portability to such environments will remain an issue
that cannot be ignored.  This being the case, the ANSI C folks have chosen
to write their standard in such a way that it is compatible with most
existing environments, not just the fortunate few.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list