length of external names

Henry Spencer henry at utzoo.UUCP
Sat Jan 5 05:46:58 AEST 1985


> The idea is that all standard systems will support a minimum size that is 
> reasonably large.

If you can convince people like IBM and DEC to go along with this and
change their object-module formats to match, the entire C community will
be forever indebted to you.  That is *not* a facetious comment; we cannot
afford to ignore the major manufacturers when we are talking about making
something really standard.  If they don't accept it, then we have a two-
level standard in practice even if it's not so in theory.  And I see no
chance whatsoever that they are going to change their object-module formats
at this late date.  None, zero.  Give it up, it's hopeless.

And just how much acceptance would you expect for a standard that none of
the major manufacturers can comply with?

> "implementaton-defined" sizes will make C programs no more
> portable then they are now in that respect.  What is the point of a standard
> if it does not make programs written to the standard more portable?

I hate to tell you this, but the current drafts have a substantial appendix
listing all the "implementation-defined" characteristics of a conforming
implementation.  Identifier length is only one of a longish list.

Even if the standard does not make programs more portable -- and it will,
it will -- it prevents future compiler writers from making them still
*less* portable.  "The difference between bad and worse is much sharper
than the difference between good and better."

> I still
> say that we should have minimum 32 character externs.  Porting ~500 lines an
> hour just because of this is very expensive as well as very stupid.

Imagine how some of us PDP11 people feel when we try to port 4BSD programs
to our machines; the stupidities are not limited to long names.  ("Malloc
never fails, so we needn't bother checking its return value.")  ("Of course
ints are 32 bits, everywhere.  The whole world's a VAX, after all.")  ("I
know I'm really supposed to use %ld to print a long, but who cares?  It's
the same size as an int, so I'll just use %d.")  The only cure for this
sort of malignant imbecility is more care by the original author.  Porting
unportably-written software is always going to be hard.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list