3 ms·
C++ has definitely changed in important ways, and I continue to use it for several things (both to manage legacy code and by choice for newer code). Having sai
by makecheck 11y ago
C++ has definitely changed in important ways, and I continue to use it for several things (both to manage legacy code and by choice for newer code).
Having said that, C++ really, really needs to start throwing out its bad ideas and creating sane defaults that mercilessly break backward-compatibility. This applies throughout the standard library and the language. It can be done in phases (e.g. identify bad behavior; introduce an opt-in compiler mode per file to change defaults and not allow the bad practices; wait a few years and change the default; wait a few more years and remove the old mode forever). C++ also really ought to provide a standard way to partition unsafe behavior from safe behavior; the vast majority of programs do not need the crazy things that are possible in C++, and it shouldn't be a big deal to require extra keywords or compiler modes to enable dangerous language features.
- pcwalton 11y ago> C++ also really ought to provide a standard way to partition unsafe behavior from safe behavior I'm not really sure this is going to be feasible, assuming by safe you mean memory-safe like most other languages. The ISO Core C++ lifetime profile is a very interesting attempt, and I hope it works out, but there are serious issues I see around shared_ptr and aliasing that lead me to doubt how much use it'll get.