The free() thing and function names

T. William Wells bill at twwells.com
Mon Sep 18 06:58:34 AEST 1989


In article <11092 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
: In article <1989Sep15.202109.4888 at twwells.com> bill at twwells.com (T. William Wells) writes:
: >BTW, I too am not very happy about this: it effectively adds a whole
: >bunch of keywords to the language. Some of which one has no reason to
: >know exists. Well, it is much too late, and I haven't a suggestion to
: >fix it; I thought I did, but on further inspection, discovered a
: >fatal flaw. So now I'll just grumble about this language deficiency
: >and learn to live with it.
:
: It would have been trivial for the Standard to have "fixed" this;
: all standard library functions could have been given names starting
: with an underscore, for example.  I personally would have preferred
: that, along with reengineering the specs for many of the functions.
: Suggestions along these lines were made, but it was deemed outside
: X3J11's charter (namely, to standardize existing practice).

Yeah. I'd have preferred something like that, but I'll also have to
agree with X3J11. Such is life.

My own suggestion was to make the names reserved only if the
appropriate header file was included. The fatal flaw is what happens
when you use someone else's library: you have (and should have) no
knowledge or control over what that library includes. Thus any
program that uses anything other than the Standard C library (which
is likely to be most of them) is going to have to assume that all the
names are reserved anyway. Thus this suggestion would add little or no
utility while inconveniencing the implementer a whole lot.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list