Conclusions of the exception discussion
deadalnix
deadalnix at gmail.com
Sat Feb 25 03:29:18 PST 2012
Le 25/02/2012 07:26, Daniel Murphy a écrit :
> "Jonathan M Davis"<jmdavisProg at gmx.com> wrote in message
> news:mailman.93.1330149312.24984.digitalmars-d at puremagic.com...
>> However, regardless of which we choose, someone is going to have to take
>> the
>> time to implement it, since odds are that Walter isn't going to do it. So,
>> whether we end up with a feature along these lines is highly dependent on
>> whether anyone is willing to take the time to implement it and get it
>> accepted
>> by Walter.
>
> Waaaay ahead of you here.
>
> https://github.com/D-Programming-Language/dmd/pull/738
>
> It's currently 'catch(auto e : E1, E2, E3)' but changing the syntax is
> trivial if everyone decides they want it.
>
>
I do think this approach have a flaw. If we go in that direction, then
it push devs to create new Exception type just to catch them, because
this is the only way we have.
If I understand properly your pull request, the compiler will be
duplicating catch block ? If it is the case, would it be possible to use
static if to use type specific stuff of E1, E2 or E3, depending on which
one we are facing ?
BTW, great job, it is definitively a nice addition to have.
jmdavis > good job to synthetize all this. I think you get the most
importants points of the talk.
More information about the Digitalmars-d
mailing list