Re: What's the deal with C99?
- From: Paul Hsieh <websnarf@xxxxxxxxx>
- Date: Wed, 26 Mar 2008 18:00:21 -0700 (PDT)
On Mar 26, 10:04 am, Keith Thompson <ks...@xxxxxxx> wrote:
Paul Hsieh <websn...@xxxxxxxxx> writes:
On Mar 25, 3:25 pm, Eric Sosman <Eric.Sos...@xxxxxxx> wrote:[...]
What substantiation do you offer for "They did not assess
the value of each feature to actual programmers?" Again, it is
not sufficient that you offer opinion about the accuracy of such
an assessment, you have claimed that no assessment was made,
faulty or otherwise. Substantiation, please.
Oh that's obvious. There are so *MANY* features that clearly need to
be in the language. The mass exodus from C (and C++) to go to other
languages by itself speaks volumes about what programmers want.
There's no feature added to C99 that addresses even one thing that has
been causing people leave C behind.
It's not clear to me that this is a real problem. Yes, programmers
leave C for other languages for various reasons, but plenty of
programmers have stuck with C for other reasons. C can't be all
things to all people, and it shouldn't try.
You don't get it do you? Its not only that people are looking for
some particular features of other languages. Its that they hate the
*problems* with C. Furthermore, unless you ask, or do some analysis,
you won't know whether or not the features they are leaving C for, are
not trivial to implement (or to counter with an alternate feature).
I, of course, have already my own sample of this sort of feedback just
for Bstrlib. What I find is that people for some reason or another
are trying to create a project in C after a long time away from the
language. The common refrain I get from them is "I was SOOOO dreading
the fact that I would have to go back to using C's strings, but am so
glad you made your library available". Of course its a self-selecting
group of people who use my library, but the number of such people is
not small. So its pretty obvious where the C language has weaknesses,
and in many of those case, there's no justification for shoving people
away from the whole language over something that can easily be worked
around.
[...]
The one feature that there simply is NO controversy about at all:
Memory management. I don't think programmers could yell any louder
for better support for any (practical) other feature.
There's no controversy about memory management? Really?
There's no controversy that its *IMPORTANT*. The C method is a loser
-- my claim is that this is primarily so because its just too minimal;
it does not even make the most minimal effort to address its own
problems. Most other people have decided vote with their feet and
just go to different languages instead.
Ok, you want improved memory management.
What has this got to do with me? Millions of programmers wanted
improved memory management. It seems that every single language
designer in the last few decades wants improved memory management. To
suggest that just *I* want improved memory management is just
preposterous. I can *DO* my own memory management thank you very
much. I've written my own heap, and pool libraries -- *I* don't need
any help from the C language committee. This isn't about *ME*.
[...] Can you present (or point to) a concrete proposal?
I am not a proposal generating beaurocrat. I am not an active
participant in the standards process, and I am not a stakeholder. I
have nevertheless proposed various API modifications in this very
newsgroup over the years just on memory alone. They have never even
been acknowledged by anyone who has influence with the standards
committee.
The (admittedly raw) proposals have typically been in the form of
size_t memTotalAllocated (void);
void * memExpand (...);
size_t memSize(void *);
enum MemType memClassify (void *);
int memCheck (void *);
int memWalk (int (* cb) (void * ctx, int state, void * loc), void *
ctx);
etc. Most of these already exist in other compilers, or in equivalent
forms in various tools. But clearly anyone with the least bit of
interest in keeping the C standard relevant could either take these
suggestions or come up with something on their own.
[...] (I assume you're not referring to automatic
garbage collection; I think the decision not to add that to the
language was a deliberate one, and it's certainly controversial.)
Clearly adding GC to the language would be a huge step, and not really
in the basic *spirit* of C or what the standards committee's modus
operandi is claimed to be (which they claim is to codify existing
practice.) Adding GC, I think, would be contingent on proving that
the technology was reasonable to implement over a wide variety of
compilers, and that the committee was willing to change its role to
that of wanting to add major features and change the target audience
for the C programming language. That is not a bad thing, but it would
be like a kindergartener deciding to write a PhD thesis; its not clear
that they are up to the task.
But this is only one possible way of addressing the problem and you
just don't *need* to go to these extremes.
--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
.
- Follow-Ups:
- Re: What's the deal with C99?
- From: Walter Banks
- Re: What's the deal with C99?
- References:
- What's the deal with C99?
- From: Bartc
- Re: What's the deal with C99?
- From: Paul Hsieh
- Re: What's the deal with C99?
- From: lawrence . jones
- Re: What's the deal with C99?
- From: Paul Hsieh
- Re: What's the deal with C99?
- From: Eric Sosman
- Re: What's the deal with C99?
- From: Paul Hsieh
- Re: What's the deal with C99?
- From: Keith Thompson
- What's the deal with C99?
- Prev by Date: Re: what this program do
- Next by Date: Re: acceptable use of goto?
- Previous by thread: Re: What's the deal with C99?
- Next by thread: Re: What's the deal with C99?
- Index(es):
Relevant Pages
|