On 5/26/2017 11:50 PM, Atila Neves wrote:
On Saturday, 27 May 2017 at 02:40:47 UTC, Walter Bright wrote:
On 5/26/2017 11:51 AM, Atila Neves wrote:
Since it's `scope`, where would it be copied to? This is assuming dip1000, of course.

The rethrow case must be allowed:

    throw ex;

Then either:

1. Elide the destructor call in that situation

That's Andrei's "move semantics" idea, and it involves major code effort in the compiler.

There's the "chain" case, too.

2. Make the developer write `throw ex.dup`

The point is to not require them to rewrite their code.


I'd prefer #2, since it would make a lot more sense for `scope`. `throw` escapes the ex IMHO.

My $0.02

Atila

Reply via email to