6 char externs and the ANSI standard

Tony L. Hansen hansen at pegasus.UUCP
Tue Oct 9 06:49:19 AEST 1984


I have a very serious problem with the proposed minimum standard of 6 char,
mono-case external variables. Say I'm working for a small company that wants
to write a new C compiler and they want me to write it fast without throwing
in anything fancy! What is my boss going to tell me when I ask him/her how
many external characters have to be supported? S/he'll certainly say "what's
the standard say?", to which I'd have to reply "the minimum is 6 characters
mono-case." Of course s/he'll say "Well write it by the standard!"

Come on folks, anytime you set a minimum like that it's going to be followed
in new compilers/linkers as well as the cranky old linkers that won't change
to keep pace with the world.

The last time that this subject came up, the consensus seemed to agree with
my position that the 6 character/mono-case limit should be a SUBSET of the
standard rather than having the standard be the minimum case. Make the
standard something sensible and then recognize those sub-standard compilers
for what they are. There's already a section on valid extensions to the
language; add a section on recognized subsets.

Think again about the above scenario. If my reply to my boss' question were
"external variables can be N characters, multi-case, but there's a subset
which only allows 6 characters, mono-case", my boss would certainly say
"We're not writing a new compiler just to be a subset! Write it by the
standard!"

----
On to specifics:

< Arguments for 6 char:
< 1. The standard's purpose is to define a portable language that may be supported
<   on most if not all machines. Some older machines can not support more than
<   this limit. To ignore this limitation would be contrary to its purpose.

So don't ignore them but recognize them as a subset from the language proper.

< 2. The limit is a minimum NOT a maximum, your compilers are free to support
<   longer identifiers, but PORTABLE programs should not depend on them.

My scenario above indicates that the minimum often becomes the maximum when
people refuse to go beyond the minimum requirements. Besides, PORTABLE
programs based on such minimum standards are very difficult to maintain
without resorting to some trickery using pre-processing of some sort.

< 3. Prelinking is perceved to be a time consuming kludge.

Only on the systems which can't be upgraded to the standard. The rest of us
get something reasonable.

----

If we allow this to get through now, we're going to be the ones that will
have to live with it in the future. Here's my vote for sanity. Please add
yours while there's still a chance!


					Tony Hansen
					pegasus!hansen



More information about the Comp.lang.c mailing list