What makes C++ called C++?
apa yang membuat C++ dipanggil C++ (C yang "katanya" lebih advanced) kalau sebenernya C++ itu
>nambah kompleksitas dari C
>compiler lebih lemot daripada compiler C
>performa lebih lemot daripada C
>bloated as fuck
setau gw c++ bukannya lebih kenceng ya
>>1
tergantung library yang dipake sama metode pemrograman
>>2
jadi skill issue nih?
>>3
C++ supports higher-level features like classes, virtual functions, templates, and exceptions. These abstractions can introduce overhead that doesn't exist in C.
>>4
agree
>>4
c is still the fastest programing lang tho
The ++
At the time, object oriented programming was hyped by computer scientists. A little bit like rust nowadays.
They even created theorems like Liskov theorem, ...
Bjarn Stroustrup was a researcher and computer scientist working at Bell labs and decided to add classes to the C programming language because it was the main language of the Unix OS (created at Bell labs too).
So he created "C with classes": as the name suggests, it's C with classes on top of it.
Since it was hyped by the community, he began adding other features and at some point there was way more than just "classes", so he renamed it C++.
Because when you want to increment a variable in some programming languages (like C for example) you can use the syntax ++.
Let's say you have a variable v declared like that:
int v = 12;
If you type v++, it will increment the value of v (v is now equal to 13).
So it's a pun to say C++ is "C+1", or like a better C.
After almost 50 years, it turns out C++ is a language that continuously added features on top of each other, most of the time, without much coherence with the already existing features.
Which makes people say that it is a complex and difficult language.
If you write your project solo from A to Z, then it can be ok because you can ignore some features of the language, but if you work in a team with legacy code, this is hell on earth.