2 ms·
> I think there's a problem here. There is a problem indeed, which is OP's failure to implement exception-safe code. If someone opts to use exceptions, they h
by rualca 5y ago
> I think there's a problem here.
There is a problem indeed, which is OP's failure to implement exception-safe code.
If someone opts to use exceptions, they have the responsibility of writing their code in a way that complies with scenarios involving throwing exceptions.
Failing to support a scenario by not following the most basic principles is something that's on the person writing the code, not the language.
It would make as much sense to blame java for the problems you create by not initializing objects in some code paths, because your code started to throw null pointer exceptions.
- Dylan16807 5y agoAre you talking about the same thing as everyone else? auto fooRef = myWidget.getRef(); vs. auto& fooRef = myWidget.getRef();? That's not a problem caused by exceptions. If you're talking about the article, the standards committee seems to think it's a confusing interpretation that never should have existed, and it's pretty ridiculous to say it's "basic principles".