C# vs modern C++ (what are the real differences left, are there any etc.)

I graduated college right after you, and used C++ exclusively for years after graduating. Even back then it was unthinkable not to use smart pointers. Whether through boost or your own variants, using raw pointers directly instead of proper RAII was an outdated practice even 20 years ago.

C# still hasn't caught up to C++ in terms of managing non-memory resources. I've used C# professionally for over a decade, and the only improvement I've seen in this area is some minor syntactic sugar for using. It's extremely hard to get right, because you have to be acutely aware of which classes implement IDisposable, you have to understand which classes take ownership of other classes passed in to them (a big headache with streams especially), and you have to remember to manually dispose of them. In C++ using best practices as of two decades ago at least, this is something you just don't ever have to think about.

Rust is a more modern language that really gets it. C# gives you basically nothing.

/r/csharp Thread Parent