•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 397,773 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,537 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 1263 | Replies: 5
![]() |
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
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++.
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.
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
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.
Member of: Beautiful Code Club.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
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 ..!



Linear Mode