dlc@VEGA.FAC.CS.CMU.EDU (Daryl Clevenger) (10/14/87)
Keywords: Having read all of this debate on the 6 character limit for identifiers, it seems that some people have a slight misimpression and are over reacting more than necessary. The following is how I see the situation: 1) Yes the limit is annoying, but a necessary criterion considering that there are machines out there whose linkers impose absurdly low limits and these must be dealt with since they will not go away overnight. Machines whose linkers impose short limits on external identifiers (although this may know longer be universally true) are: a) Some versions of the IBM 360/370, I believe used to impose a a 6 character limit. b) The PDP-11 linker (all I'm not sure) were 7 or 8 characters. 2) As Doug Gwynn pointed out (and Doug certainly knows what he is talking about), this limit is ONLY imposed one EXTERNAL identifiers and is a concession that C is making to linkers that impose this limit. FORTRAN environments (as somebody pointed out) are notorius for this and on many systems the same linker is used to link intermediate object files from FORTRAN, C, etc. Local variables are completely unaffected (and I assume static functions likewise). 3) This restriction (and case insensitivity) on external identifiers will of course affect the choice of names for functions and global variables, but can be overcome. All that is required is that names be unique to the first 6 characters (and case wise distinct). So you may have to be a little clever (and careful) with external names, but this is doable. Besides, if you really don't want to be 100% portable, that is anybody's perogitive. 4) Finally, also as Doug pointed out, this is a restriction that is permitted to go away with a later revision. As people try to be ANSI compliant, if this restriction becomes too much of a pain, then hopefully the guilty parties will wake up and move to the 80's by at least fixing their brain damaged software. The best tactic that I see is to exert as much pressure on the guilty parties as possible. Finally, my own personal note. If I write a program that I expect every current machine/implementation to want to run (doubtful), then I will try damn hard to make it portable in this regard; however, I see other portability issues as more difficult to be aware of and tackle. In general, I will choose to ignore the restriction. I see the restriction as unfortunate, but a necessary reality and I can only hope that it will be short lived. Daryl Clevenger dlc@cs.cmu.edu