|
| 26 Sep 2017 02:38 AM |
| I am confused that someone would use C++ over using C, it's slower than C, it's bloated, and it's OOP. What's the point in using it over C? |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 02:41 AM |
because it is upgraded 2 times
|
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Sep 2017 03:41 AM |
Because it's just simply easier to use. There are many things like classes and objects which considerably facilitate the process, and it's a much better choice for parts of code which are not as performance demanding as the rest. Not to mention that most C code can run in C++.
Unless you are trying to make a real-time physics simulation or something as such, there is no reason not to choose C++, but even then it's more than enough since you can mess up much less in optimisation than in C. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 26 Sep 2017 03:51 AM |
I see two options.
1. This is a troll.
2. You don't actually know anything about either language.
The only valid point there is it being bloated, which is the cost of backward compatibility. |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 04:19 AM |
| Please name C++ features which aren't in C, aren't broken, and isn't constexpr. The OOP parts of C++ are broken so it does not help. |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 04:28 AM |
"1. This is a troll." "Please name C++ features which aren't in C, aren't broken, and isn't constexpr. The OOP parts of C++ are broken so it does not help."
I'll go with option 1.
|
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 04:30 AM |
| Answer the question if you think I'm trolling. |
|
|
| Report Abuse |
|
|
Trfe2000
|
  |
| Joined: 23 Apr 2016 |
| Total Posts: 73 |
|
|
| 26 Sep 2017 04:40 AM |
If I'm correct C++ has a few extra features like; templates, classes, operator overloading and virtual functions. And if I'm right C doesn't have it or else less.
And what I do know for sure is that compared to C there is more type checking available in C++.
But I don't use either, I prefer C# above both of them and that's also what I'm learning atm >.>
|
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 04:41 AM |
Once you realize what's wrong with C++ you realize you're writing in C, and some things that work in C++ don't even 'work' in C. Here's an example:
int x = 3, y = 4; int* p = &(x < y ? x : y); |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 04:51 AM |
| "If I'm correct C++ has a few extra features like; templates, classes, operator overloading and virtual functions. And if I'm right C doesn't have it or else less. And what I do know for sure is that compared to C there is more type checking available in C++. But I don't use either, I prefer C# above both of them and that's also what I'm learning atm >.>" C++ templates are better than ### (of course) nothing but they are still broken. Template metaprogramming also is awful. Why would you ever need to overload operators? "Virtual functions" as stated above about OOP parts in C++, broken. Also function overloading causes name mangling. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 26 Sep 2017 04:55 AM |
"Please name C++ features which aren't in C, aren't broken, and isn't constexpr."
You know, these questions have been asked many times before and answered by people more qualified than me, learn how to use search engines. Literally google "c++ features not in c".
It has been proven time and time again that C is a horrible language for applications and software in general.
If C was a good language people wouldn't try so hard to get away from it. |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
|
| 26 Sep 2017 04:56 AM |
| why not put this on stackoverflow or something instead of the roblox scripting subforum |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2017 05:35 AM |
| ^IKR, I learned both around 4-5 years ago, but gave up on both in favor of C#. The thing is just simply superior in every way as long as you don't have to go too much into low level stuff. Not to mention that you can implement quite a lot of libraries compatible with C and C++ with slight modifications, unless that was already done. |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Sep 2017 06:09 AM |
c++ is so distant from c now you cant even compare them
print("print()") |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 26 Sep 2017 06:37 AM |
if you google it and click on a bunch of links you get a lot of answers
the only reason someone would ask here, is because they don't know about google, or they don't want good answers
the reason being you will find far fewer c/c++ programmers in this subsection than in the first few links of a well-worded google search. |
|
|
| Report Abuse |
|
|