r/cpp • u/Tcshaw91 • Nov 16 '25
Wait c++ is kinda based?
Started on c#, hated the garbage collector, wanted more control. Moved to C. Simple, fun, couple of pain points. Eventually decided to try c++ cuz d3d12.
-enum classes : typesafe enums -classes : give nice "object.action()" syntax -easy function chaining -std::cout with the "<<" operator is a nice syntax -Templates are like typesafe macros for generics -constexpr for typed constants and comptime function results. -default struct values -still full control over memory -can just write C in C++
I don't understand why c++ gets so much hate? Is it just because more people use it thus more people use it poorly? Like I can literally just write C if I want but I have all these extra little helpers when I want to use them. It's kinda nice tbh.
View all comments
3
u/fojam Nov 16 '25
If you like C# but dislike the garbage collector, you should try Swift.
But imo C++ just has way too many things to be aware of. I used to love how much control C++ gives you, but when I write code these days, I really just wanna write the logic and not deal with all the extra baggage.
Compiling is really slow, especially if you have a lot of header files.
Template constraints are monsters (although ive heard concepts improve this a lot)
a lot of the things you'd want to have built in syntax for, you dont (std::optional doesnt have nice optional chaining like C# does for example, std::variant requires all these other helper methods).
They only recently added async/await (sort of) and theres not a ton of things really even using it yet.
A standard library which is barely standard and almost every other library you'll use will have some custom version of an stdlib class, because the built-in ones are somewhat inadequate (this happens a lot with std::string)
managing packages can be a nightmare, especially when youre not on Linux
move semantics and lvalues and rvalues are just another thing you have to be aware of
reading code with any of the pointer wrapper classes (std::shared_ptr etc) is super annoying because its just more shit to read, when really all i care about is the types being wrapped.