Discussion Thread: DIP 1032--Function pointers and Delegate Parameters...--Community Review Round 1
Adam D. Ruppe
destructionator at gmail.com
Fri Apr 3 12:58:24 UTC 2020
The inheritance rationale also applies to aggregates btw, which
if done would obviate the "by default" changes btw.
Once this change is made, the aggregate status quo will stand out
even more as a weird inconsistency.
Moreover, what if you need to invert the attributes? Yes, the
same thing comes up again.
nothrow
int makeNothrow(void delegate() dg) {
try {
dg();
return 0;
} catch(Exception e) {
return e.toErrorCode();
}
}
Obviously, a nothrow dg there defeats the purpose of that
function... so how do you tell it you want a throws dg?
There's an easy fix here, something we've wanted for ages, but
this change makes it all the more necessary.
More information about the Digitalmars-d
mailing list