nothrow by default

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Jan 5 13:51:33 UTC 2020


On Sunday, 5 January 2020 at 13:32:24 UTC, rikki cattermole wrote:
> When I described unrolling, I do mean unrolling using the 
> exception handling mechanism.

But how will it be faster if it doesn't recover on the spot?

So, if you have an object like the one you propose you could also 
make that object a resource manager (held in thread local 
storage). Then you don' t have to unwind. You just free all the 
resources the object is holding onto, set a new stack pointer and 
load in the landing pad in the program counter.

But you need a smart compiler, strict type checking and a 
cleverly designed runtime.

Anyway, C++ deprecated the the "throw" specifier in C++11 and 
removed it  completely in C++20. Not sure why D users will be 
more accepting of having to specify "throw".

More patient user base perhaps.



More information about the Digitalmars-d mailing list