| | |
Lumping C and C++ together..
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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++.
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++.
[QUOTE=alpha_foobar]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.
[QUOTE]
Mixing C with C++ code is generally frowned upon. I really don't want to argue and split hairs.
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.
[QUOTE]
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++.
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.
>"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.
New members chased away this month: 4
![]() |
Similar Threads
- Global Header, Footer and Side Bars (HTML and CSS)
- canistotasoftware.com (Website Reviews)
Other Threads in the C++ Forum
- Previous Thread: String to disk with fstream
- Next Thread: HELP me as soon as possible ..!
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






