What's C's biggest mistake?
Walter Bright
newshound1 at digitalmars.com
Thu Dec 24 16:31:55 PST 2009
Edward Diener wrote:
> Walter Bright wrote:
>> http://www.reddit.com/r/programming/comments/ai9uc/whats_cs_biggest_mistake/
>>
>
> This reminds me of the Java idiots when Java first came out. They
> discussed C endlessly trying to prove Java's supremacy as the new
> premier language, and either completely ignored that C++ existed or
> acted as if C++ was a computer language nobody actually used as opposed
> to that paragon of an up to date programming excellence circa 1996, the
> C programming language.
C is still heavily used today for new code, so fixing a mistake in it is
very relevant. It's a lot easier to add a simple compatible change to C
than to convince people to change to a whole new language.
> Think how you will feel in 10 years when others belittle the D
> programming language, compared to other languages around in 2019, and
> are always referring to D version 1.
I expect that time will expose many mistakes in the design of D. How I
feel about it would be quite irrelevant. My article was not about
attempting to get anyone to switch away from C - it was how a simple fix
to C will address a serious shortcoming. It will still be C. It is not
fundamentally different from bashing C++ for not having variadic
templates and then proposing variadic templates for C++0x.
> While I admire much of the work you have done in creating D, it does not
> take much for an intelligent programmer to realize that your own view of
> C++ is jaundiced and heavily affected by what you perceive as D's
> improvements over C++. As a suggestion, which I don't expect you to
> take, you would do much better in viewing C++ in a more reasonable light
> while touting features of D which you feel is an improvement.
Many people have suggested I stop comparing C++ to D, and they're right,
and I have generally done so.
As for my view of C++ being jaundiced, consider that I have been in the
C++ compiler business since 1986 or so. I'm still the only person who
has written a C++ compiler from front to back. I still support and
maintain the C++ compiler. C++ has been good to me - professionally and
financially. I did not discover D and become a fanboy, it was created
out of my frustrations with C++. Of course I perceive D's improvements
as improvements over C++ because I deliberately designed them that way!
I have a C++ compiler, I wrote nearly every line in it, I know how it
works and how to implement all of C++'s features. So if D doesn't work
like C++ in one way or another, there's a deliberate choice made to make
the change - not I didn't know how to do it.
In other words, I don't feel my view of C++ is based on prejudice. It's
based on spending most of my professional life developing, implementing,
and using C++. C++ did a lot of things right, and you can see that in D.
My opinions might still be wrong, of course. I have another blog post
I'm working on that lists several design mistakes in D <g>. I hope
you'll find it enjoyable!
Andrei and I were just talking about programming language books, and how
we both thought it was disingenuous that some of them never admit to any
flaws in the language. We hope we don't fall into that trap.
More information about the Digitalmars-d
mailing list