Plan for Exceptions and @nogc?

Tobias Pankrath via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 17 10:48:53 PST 2015


On Tuesday, 17 February 2015 at 18:40:51 UTC, Matthias Bentrup 
wrote:
> On Tuesday, 17 February 2015 at 18:30:24 UTC, Jonathan Marler 
> wrote:
>> I thought of the same thing but then realized that it would be 
>> impossible to ensure that the catch block wouldn't stomp on 
>> that memory.
>
> The catcher wouldn't stomp any more on the thrower's memory 
> than a function stomps on the memory of its caller. All the 
> data of the thrower is safe, because it is above the stack 
> pointer. The unwinding hasn't been done at that point.

That would be a deep change in language semantics. Think 
scope(exit), scope(failure), destructors of structs.


More information about the Digitalmars-d mailing list