C++ is C with classes . Or is it?

*vsauce music intensifies*

Published on 2/1/2025
Last edited on 20/5/2025


EDIT 20/5/2025 : Uhmm actually I think C++ is pretty good after my Data Structures professor forced me to do data structures in C.

C++ is now my preferred language when I don’t know what language to use , such as for solving LeetCode problems.

But I will try to use Rust for everything else whenever I can. CUZ I AM A RUSTACEAN NOW


Ah sh$t here we go again.

In the last few days, C++ has become my favourite language. In stark contrast to JS, it’s a strictly static-typed language. What I mean by that is that all C++ variables must have a type and once the type is defined it can’t be changed later. C++ feels like a middle ground between C and some OOP language like Java (without all the boilerplate of course!).

Personally, whenever a language compiles to a native executable it just hits different to me. It’s just so satisfying to run a native executable.

C++ might not be C with classes, but it’s better. Objects, vectors, random number generators that have uniform distribution, smart pointers, iterators, optional, move semantics, and whatnot, all in a language that compiles to a native executable. What else do I want?

But as with all things that are real, it is not perfect. C had very few ways of having a segmentation fault and/or undefined behaviour, but with C++ there are dozens of ways my code can have undefined behaviour. (Feels like the “undefined behaviour (s)” got a ++ too lol.) Although I haven’t experienced all of them first-hand, I know that I will encounter one of them someday and wonder, “Why isn’t my code working the way it’s supposed to?” only to realize that all the effort I was putting into my C++ program to fix the issue, for DAYS, was just because of a FRICKING DANGLING POINTER !!
(Happened to me yesterday lol)

But that’s what, things like cppcheck are for right? (got to know about it yesterday). It was pretty good. It detected my dangling pointer right away, and I thank whoever created it because its output was just so descriptive.

So what is C++? C + modern features + modern problems.
(That’s why it has two + lol)
And you know how to solve modern problems right?
Right?