DIP 1008 Preliminary Review Round 1

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Fri May 26 11:51:31 PDT 2017


On Friday, 26 May 2017 at 08:49:42 UTC, Walter Bright wrote:
> On 5/25/2017 4:54 PM, Atila Neves wrote:
>> I think maybe the problem isn't with `throw` but with `catch`. 
>> What if instead we make it so that:
>> 
>> catch(scope T ex) { /*...*/; }
>> 
>> Means:
>> 
>> catch(scope T ex) { /*...*/; ex.__dtor; }
>
> The trouble comes in when one starts copying exception 
> references around. Who then is responsible for destroying it?

Since it's `scope`, where would it be copied to? This is assuming 
dip1000, of course.

Atila


More information about the Digitalmars-d mailing list