4 ms·
A C++ success is the thing that I don't understand. I do understand why Haskell is a niche language. I do understand why Scala has fallen out of fashion. C++
by vbezhenar 3y ago
A C++ success is the thing that I don't understand.
I do understand why Haskell is a niche language.
I do understand why Scala has fallen out of fashion.
C++ is more complex than any IT-related technology I ever saw. It was destined to fall. But it did not.
- suby 3y agoIt's because it is fast. I write small video games, and I have performance metrics I need to hit. Other languages may be nicer to write, but if it is at the cost of performance, it is making my life harder. Up until recently, if you wanted a language which didn't hurt you in performance, your choices were basically C or C++. You can debate whether C++ is better than C, but it has a lot more features, many of which I would miss if I had to use C. Every language which attempted to compete with C++ did so with automatic memory management or other features which were bad for performance. If the goal is to kill C++, they made the wrong tradeoffs and introduced anti-features from a C++ pov. Only recently have we gotten languages which actually compete with C++ on this level like Rust, Zig, Odin, etc. It's also because it extend C, and C is the linga-franca of programming.
- flohofwoe 3y agoIt's mainly momentum from the late 90's. Back then C++ actually was a better C, and upgrading code bases from C to C++ often made sense.
- dzogchen 3y agoBecause it is mostly backward compatible with C. The people that think Rust is 'the next C++' are delusional. The next C++ will be backward compatible with C++.
- Alifatisk 3y agoCan Carbon language by Google be counted as the next C++?
- UncleMeat 3y agoThis is a goal, sort of. They've publicly stated that they want Carbon to be an easy transition from C++, like Kotlin did for Java. But they want a particular kind of language. A challenge with C++ today is that users want very different things. Google doesn't like being limited by strict ABI stability. Other people want to link their code against binaries compiled a decade ago. Carbon is promoting a particular language evolution model that makes sense for a lot of use cases but not all use cases. It also remains to be seen if it'll work. A lot of people don't trust Google and languages take a long time to build.
- lordnacho 3y agoIt's because it's not a language. It's a bunch of languages mixed together, like a workshop with every kind of exotic and dangerous tool. You are bound to find _something_ that works for your usecase in there. This is also why it's fast. You are not required to use any particular thing.
- drawkbox 3y agoC++ is the base of pretty much all our applications. It "won" over Objective-C/C++ and added to C in a way when the application age came. C/C++/Objective-C/Objective-C++ all sit at the balancing point / center of mass between the machine code/assembly and something that is a language, so they are the base of everything including applications, virtual machines and more. It took the Application Layer of the OSI by storm. C/C++ will always be around no matter how hard replacements are thrown at it. C++ is the Grand Canyon and attempts to dethrone it from what it does best are mere rainstorms adding to a river at the bottom of the canyon, maybe one day but that day is not close. C/C++ work well together and this made them win along with the power and timing of coming about in the application age.
- kzrdude 3y agoI think it's because it is permissive (the implementations are). Much like the success of hammer and nails.
- dehrmann 3y agoC didn't have enough abstractions to scale to large projects. Most of these projects would go on to choose better languages (Perl, PHP, Java, Python, C#). If you still wanted speed, you chose C++.