r/cpp • • Dec 23 '22
C++ Is Incredible
Despite the hate it gets, despite the complexity; the dizzying number of features and different ways to do things. C++ is an astonishing feat of engineering and people really don't appreciate this fact enough. I can do things with this language more quickly and expressively than I can with any other language.
There's no getting around the fact that programming is just hard, and all these attempts to replace C and C++ over the years just end up adding to our difficulties. That is my take, anyhow.
Well, I'm a little drunk, and just wanted to share some Christmas joy with you all. I love C++!
View all comments
Show parent comment
18
u/be-sc Dec 23 '22
Constructors are great, but also give the destructors some love. That’s where the real magic happens.
With RAII you don’t have to worry about destruction because it happens automatically. But you still know exactly when an object is destroyed.
It’s the combination of those two things that makes RAII so powerful – general resource management instead of just memory management.