3 ms·
The whole point of this new feature is to add safety. If you want the old semantics, use null pointers. Adding a feature which creates the illusion of safety wi
by Animats 8y ago
The whole point of this new feature is to add safety. If you want the old semantics, use null pointers. Adding a feature which creates the illusion of safety without providing it is not helpful.
- keldaris 8y agoNo, the point of this new feature is to add safety where you want it. That's not the same as mandatory safety. You can use the safe semantics throughout your codebase while retaining the option of direct ("unsafe") dereferencing wherever you prefer not to pay the costs of the safety checks. That's a basic requirement of how any new feature should work in a performance-oriented language. C++ is and always has been about giving the programmer tools and leaving the decision up to the programmer. If you want a language that does the choosing for you, just use something else.