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.

192 Upvotes

334 comments sorted by

View all comments

Show parent comment

2

u/Tcshaw91 Nov 16 '25

Sounds fair. Yea I never looked into swift. Is that the one that's used for like iOS development? I remember kotlin/java was used in android studio. Was it Swift and something else for iOS/xcode?

I've also been keeping an eye on Zig. I do still really enjoy C, but there are some serious unaddressed pain points lol.

2

u/fojam Nov 16 '25 edited Nov 16 '25

Its for iOS and macOS yes, but its cross platform. It basically took all the stuff that was annoying about Objective-C and fixed it.

I def understand the appeal of all these lower level languages like C/C++/Rust/Zig etc but at this point I really just need the language to get out of my way as much as possible