Reserved names in X3J11 -- Hang on folks!
Neil Winton
nwinton at axion.bt.co.uk
Fri May 27 19:11:03 AEST 1988
>From article <211 at proxftl.UUCP>, by bill at proxftl.UUCP (T. William Wells):
> In article <4085 at haddock.ISC.COM>, karl at haddock.ISC.COM (Karl Heuer) writes:
>> In article <176 at proxftl.UUCP> bill at 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 at 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 ***
More information about the Comp.lang.c
mailing list