r/cpp • • 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.

194 Upvotes

334 comments sorted by

View all comments

Show parent comment

6

u/Tcshaw91 Nov 16 '25

Yea I'm basically perceiving it that way atm. I enjoy C a lot. I liked how it forced me to deal with memory management explicitly and forces me to face some of the uncomfortable realities of working with things at a low level. I grew to really enjoy making my own systems, abstractions and ways of dealing with the problems and having a deep understanding of how they work. The main things of c++ that I enjoy the most just allow me to do the same stuff but with a little more type safety and nicer syntax imo, plus some std stuff for when I don't really care about performance and just want something to work lol. But yea I like how it doesn't force me to adhere to any particular way of doing things yet provides a nice set of tools to aid me in doing things if i want them.

1

u/Old_Cartoonist_5923 Nov 17 '25

Just keep in mind that C++ is it's own language and you'd be wise to treat it as such. There are a number of things that work differently between C and C++, and working on a code base written by someone who treats C++ as "C but with classes" can quickly turn into a maintenance nightmare.