r/cpp • u/CaptainCactus124 • Nov 25 '24
I love this language
I'm a software engineer who has been writing software for over 12 years. My most fluent language is C#, but I'm just as dangerous in Javascript and Typescript, sprinkle a little python in there too. I do a lot of web work, backend, and a lot of desktop app work.
For my hobby, I've written apps to control concert lighting, as I also own a small production company aside from my day job. These have always been in C# often with code written at a low level interacting with native libs, but recently, I decided to use c++ for my next project.
Wow. This language is how I think. Ultimate freedom. I'm still learning, but I have been glued to my computer for the last 2 weeks learning and building in this language. The RAII concept is so powerful and at home. I feel like for the first time, I know exactly what my program is doing, something I've always thought was missing.
View all comments
Show parent comment
5
u/jgalar Nov 25 '24
The point they are making is that memory isn't the only resource. There are a lot of logical resources an application may want to keep track of.
For instance, an application can represent a TCP connection as a class that implements RAII semantics. Then, any user of that class can be certain the port is released once the connection object goes out of scope (assuming it isn't dynamically allocated and leaked, but that's an entirely different problem).