addressed in C. It's a problem that requires objects with copy, move, init, and deinit operators/functions. C++ has a plethora of tools to bake memory safety directly into your data types/design.
Any and all complications in C++ are entirely opt-in. Hate templates? Don't use them. Hate pointers? Don't use them. Hate NULL? Don't use it. You can realistically write C++ that lives entirely on the stack and leverages references/std::move. When I started C++, I was blown away with how high level it was. How scalable the software will be is up for debate, but it's pretty amazing how far std::string and std::vector will get you. I don't think a lot of people actually understand how much of C++ is entirely opt-in.
I'm personally of the belief that C++ entirely removes the need for C, since at the bare minimum you can write raw C in .cpp since the interop is to the point where they're the same language. However, I also recognize that people with years and years of C experience have probably figured out patterns to work around the limitations of the language.
That being said, coming from C myself, I also recognize the immediate power C++ gives you and I've learned purely through experience that the more C++ you adopt, the more performant, scalable, and safe your software becomes. Which is ironic, because those are exactly the types of benefits that "modern" languages swear by. C++ offers them in spades and yet it has to be the most hated and misunderstood language on the internet lol.
https://redd.it/1ovdx7a
@r_cpp
Post #24230
31