[comp.lang.c] Reserved names in X3J11 -- Hang on folks!

nwinton@axion.bt.co.uk (Neil Winton) (05/27/88)

From article <211@proxftl.UUCP>, by bill@proxftl.UUCP (T. William Wells):
> In article <4085@haddock.ISC.COM>, karl@haddock.ISC.COM (Karl Heuer) writes:
>> In article <176@proxftl.UUCP> bill@proxftl.UUCP (T. William Wells) writes:
>> >It is certainly the case that some of the things they [X3J11] are doing
>> >are really screwed up [e.g.] the reserved library names
>>
>> Reserved library names are current practice.  ("Reserved" meaning that you
>> might be able to get away with redefining them, but it's not portable.)  You
>> can't blame X3J11 for that one.
> 
	[ Stuff Deleted ]

> Another issue related to the library name issue (and which was
> also on my mind when I wrote the quoted passage) is the general
> name space pollution problem.  If you want to write a really
> portable program, one which is unlikely to cause problems now or
> in the future, there are a whole bunch of names you should steer
> clear of.  Like names beginning with a E.  Or names beginning
> with str.  Or names beginning with ....  But you get the idea.

That is entirely the problem at the moment!  I have recently been working
on porting ~1.5 million lines of code from UNIX to VMS.  Because of the
VMS linker you CANNOT, in any painless way, usurp the functions found in
in the (shareable) C run-time library.  This `name space pollution' exists
now and `reserved' library names are a problem for PORTABLE programs.

Now take one step back from the issue.  These ANSI restrictions are there
top help you write PORTABLE programs.  We all like to consider that we code
well and `portably', but I can tell you from bitter experience that, at
least 90% of the time, such is not the case.  The folks on the ANSI
committee represent a large body of experience of more architectures and
operating systems than most of us are ever likely to come across.  I have
a deal of confidence that they  know much more about portability than
I ever will.  So, if I want to write truly portable programs I will follow
their advice.

Now if portability is NOT an issue, then you are free to disregard such things
as reserved library names (although it would be a severe problem if your
compiler refused to let you do so!!!).  Just don't expect your program to
be maximally portable.  That's the way the world is now.

(Deep Sigh ...)

	Neil

E-Mail (UUCP)  NWinton@axion.bt.co.uk  (...!uunet!mcvax!ukc!axion!nwinton)
Organisation   British Telecom Research Laboratories (RT3134)
Snail Mail     BTRL, Rm 23 B68, Martlesham Heath, IPSWICH IP5 7RE, UK
Telephone      +44 473 646079 (or +44 473 643210)
*** This line intentionally left justified ***