I'd say C/C++ are different in culture and paradigm.... But I'd not say they are completely different.. for one if you programme in C you typically use a compiler or IDE that also fully supports C++... essentially allowing your code to be a mixture of C and C++ if you want to... and sometimes even if you don't.

And a difference in paradigm is not really specific to a language... you can programme OO in C and likewise you can programme procedurally in C++.

I'd say C/C++ are different in culture and paradigm.... But I'd not say they are completely different.. for one if you programme in C you typically use a compiler or IDE that also fully supports C++... essentially allowing your code to be a mixture of C and C++ if you want to... and sometimes even if you don't.


Mixing C with C++ code is generally frowned upon. I really don't want to argue and split hairs.

And a difference in paradigm is not really specific to a language... you can programme OO in C and likewise you can programme procedurally in C++.

C was _designed_ as a procedural language, C++ was _designed_ as an [pseudo] object-oriented language. They are fundamentally different in their higher-level approach.

Sure, they are designed with a different paradigm in mind... but it doesn't necesarily make them completely different.

Alot of C++ source code thats around looks exactly like C... and most of the tips and tricks that apply to C++ also apply to C...

Allow me to paraphrase and offer an official response.

>"C and C++ are different languages"
Yes they are. Properly written C will likely break when compiled as C++ for any non-trivial program, and properly written C++ is barely recognizable as "something like" C.

>"Most C++ looks like C"
Yes, but only because most C++ isn't written using the full capabilities of the language. You'd be surprised how many people write C using C++. The result is less than optimal because it wastes most of C++'s power and flexibility.

>"C++ tricks will usually work in C"
This is iffy. C++ tricks can be made to work in C, but the useful ones require a lot of work and ugliness. C tricks, on the other hand, can generally be used successfully in C++, but they are almost always inappropriate.

Official response to splitting the forums:

I don't see any need at this point to split the C/C++ forum into separate C and C++ forums. We don't get enough C questions to warrant such an action. In other words, there's not enough obvious confusion because most questions are focused on C++ and not C. Those that are focused on C typically make it clear through code or comment.

A common drawback to separating C and C++ forums is that many people don't know the difference between the two languages and will pick a forum at random, or cross-post to both, thus defeating the purpose of splitting the forums in the first place.

To get the general feeling on this issue, I'll start a poll and see what everyone thinks, because you do make legitimate points.

To get the general feeling on this issue, I'll start a poll and see what everyone thinks, because you do make legitimate points.

Cool. And while the poll is going, I'll learn to use bbCode *doh* :)

This article has been dead for over six months. Start a new discussion instead.