C not LALR(1) & compiler bugs

richw at ada-uts.UUCP richw at ada-uts.UUCP
Sat Feb 1 03:22:00 AEST 1986


Well, I've calmed down a bit.  That was quite a flame...

Whether you consider these ambiguities "all that bad" seems to
be a matter of personal taste.  I guess I should've kept in mind
that the goals in the design of C were speed and ease of compilation
(it seems), along with access to low-level "stuff".  Being hyper-
critical probably stems from dealing with languages where program
correctness and readability are major concerns...

In any case, the 8 significant character stuff...  (yes, more flames)

>> ...  As to the 8 significant
>> characters, that's a problem for the compiler designer, not a built-in
>> limitation, and undoubtedly stems from associated assembler and linker
>> limitations, not C's own.
>>
>>         Mike Farren

I'm not sure what "standard C" says about this, if there is such a
standard yet, but I simply don't like being told in K&R and H&S that
if I want my programs to be portable, I should ensure that the first
six characters of all of my external id's are different, ignoring case,
so that I can port it to a Honeywell 6000.  Is it really crucial for
the compiler generated code to conform to the limitations of ALL
linkers and loaders?  I've got a linker that only deals with 2 significant
characters -- should I expect all C programmers to conform to it?
Of course not; I should either get a modern linker or worry about
mapping identifiers in the object code MYSELF -- it really isn't
hard.

If anybody can think of ANY reason for limiting the number of significant
characters of non-external identifiers to 8, I'd be honestly interested
in hearing it -- these identifiers don't even exist after compilation!
Programs (in this case, compilers) which must
deal with strings of indefinite length are a little harder to write;
you might have to even use the heap (GASP!).  But, come on, should
you, in your language definition, make such silly concessions simply
to ease the construction of compilers for your language?  An individual
compiler is written ONCE; once your compiler can handle arbitrarily
long identifiers, the people that program in your language NEVER have
to worry about them again in the multitude of programs they will write
and compile using your compiler.



More information about the Comp.lang.c mailing list