DIP 1029---Add throw as Function Attribute---Community Review Round 1
Dukc
ajieskola at gmail.com
Tue Jan 14 16:44:58 UTC 2020
This would be a step forward, of course. But would not it be
better to kill the one-way attribute problem in one go -meaning,
making an antiattribute for `pure` and `@nogc` too?
In addition, I suggest that there should be a way to use
[`pure:`/`nothrow:`/`@nogc:`/`@safe:`/their antiattributes] so
that they only apply when attributes are not inferred - not for
templated functions. This would also remove a big obstacle from
front of DIP1028, as one could just mark the whole module
`@system` with one statement without killing template `@safe` or
`@live` inference.
Also a few smaller things:
-Why `throw` instead of `@throw`? I'm not saying it's a bad idea,
but write the rationale in DIP.
-You mention that due to lack of an antiattribute, aggregates
don't propagate @nothrow to their member function. Since you
claimed "no breaking changes", I guess you meant it to be left
that way. But the DIP should be explicit about that.
More information about the Digitalmars-d
mailing list