No, I believe someone corrected me before. Many C compilers allow stupid things that aren't actually allowed by the C standard. You can just as well pass a double to a function that wants void*. How's that for type safety? So far as I know, this is not allowed by the standard, but the code compiles nevertheless, but in C++ it would never work.
Originally Posted by CornedBee
This is what I was referring to.
True, true. But then again, it will keep newbies for making silly mistakes and ignoring warnings.
C was invented before C++, though... I don't know if there's going to be anymore updates to C? Anyone know about that?
Latest full C revision: 1999. Latest full C++ revision: 1998. So C is more current than C++ ;)
One language ;) Why have two that can do the same thing?
But we don't want more.
Get rid of C? You want to get rid of C, then use C++ to program C code? Again: why not just use C?
And besides, what if you want to do C+? I think in some situation you can get away with it. It's better to do C+ instead of pure C what you can't do full C++.
Anyway, that's just my opinion.
Sure, but as I mentioned to CornedBee, at least it seems to follow the standard better on things such as type safety.
Originally Posted by Prelude
It is, it is. But then again, why use an old tool when you got a better, newer, shinier one? Shrug.
>and allows for additional things like constant numbers instead of defines.
That's a personal preference, IMO.
I know... but if we keep teaching C, it will never go away. Best to start somewhere, isn't it?
>So I don't see why we use C to write C code and not try
>to use C++ to write it instead so we can get rid of C.
Probably because too many people are aware that it's impossible to "get rid" of a language that was as popular as C.