E. Robert Tisdale said:
Naturally. Whilst I don't claim to be perfect, I am quite accustomed
to being correct. You should try it.
Every C program should also be a valid C++ program.
By the same reasoning, every C++ program should be a valid Python
program. Is there no beginning to your reasoning ability?
Fine. C is here. C++ is over there.
A silly challenge, and I'd be silly to respond. Okay, so I'm silly.
Here are ten reasons that C continues to be important:
1) C's "absence of restrictions and its generality make it more
convenient and effective for many tasks than supposedly more
powerful languages".
2) "C is not tied to any particular hardware or system [...] and
it is easy to write programs that will run without change on
any machine that supports C".
3) "C has proven to be a pleasant, expressive, and versatile
language for a wide variety of programs."
4) "It is easy to learn".
5) It "wears well as one's experience with it grows."
6) "Since C is relatively small, it can be described in a small
space, and learned quickly. A programmer can reasonably expect
to know and indeed regularly use the entire language."
7) "C has proven to be an extremely effective and expressive
language for a wide variety of programming applications."
8) Many programming languages offer support for libraries with
C bindings, so it is possible to provide functionality for
users of all these languages in one fell swoop.
9) On some platforms, C is the *only* available HLL!
10) People think in different ways. Some people think in a way
that matches C++ very well. They will be happiest and most
productive when using C++. Some people think in a way that
matches Perl very well. They will be happiest and most
productive when using Perl. And some people think in a way
that matches C very well. They will be happiest and most
productive when programming in C.
The first seven reasons are in the canonical literature, so you
ought already to have been aware of them. The last reason is
sufficient on its own to justify the existence of *any*
programming language.
C++ programmers want C++ to evolve and grow.
Why did you evade the question?
Why are you waiting then?
I'm not. I'm getting on with programming in C. When C99 becomes as
portable as C90, I'll switch over. In the meantime, I have better
things to do with my time than wait for something that's probably
never going to happen.
Yes.
Which of your target platforms
*cough* You /really/ don't understand the concept of portability, do
you?
doesn't have C99 support
for the features that Masood mentioned?
Well, he mentioned new, delete, and references, which are not
supported by C99 at all. As for the other things, they're not
sufficient on their own. As far as I'm aware, all the compilers
I have on the machine I'm currently using to compose this reply
support single-line comments. But if I put a single-line comment
in my code, it is no longer portable to implementations that
strictly enforce C90. So, until C99 in its entirety is widely
available, I shan't be using it.
and compiler developers haven't fully implemented them [yet]
so I don't think that there will be much interest
in adding the C++ features that you have mentioned.
Whoa, something we agree on.
Nonsense!
You mean you disagree with yourself? Somehow, that doesn't surprise me.
When have you every complained to a compiler developer
about missing C99 features?
No use complaining to one compiler developer. One C99 implementation
isn't anywhere near enough to persuade C90 developers to switch.