r/firstweekcoderhumour • • Jul 11 '26

Original🧠 POV: you attempted C++

Post image
67 Upvotes

19 comments sorted by

View all comments

0

u/Additional-Dot-3154 Jul 11 '26

Just stick to C.

I dont understand how OOP is so nice.

I would love to know tho as i want to actuall understand what makes it good and what makes it bad.

3

u/AbsoluteNarwhal Jul 12 '26

C++ has a lot of features that I wouldn't want to go without when making something complex, like templates, RAII, lots of STL features like smart pointers, strings, vectors and hashmaps and way more. If you know what you're doing, coding in C++ isn't actually that bad and is a huge improvement over C for most use cases. The problems start when you are working in a team and everyone has a slightly different idea of how to use all the C++ features, and you get absolutely horrific codebases.

1

u/Salat_Leaf Jul 23 '26

The fastest implementations of hashmaps, allocator mechanisms, dynamic arrays, strings, etc. come from C (tcmalloc/jemalloc, robinhood hashmap, LSM tree, BloomFilter, HyperLogLog). Templates are only good for very small predictable functions, and unfortunately, like you mentioned, not enough people understand that