DIP 1029---Add throw as Function Attribute---Community Review Round 1

jmh530 john.michael.hall at gmail.com
Wed Jan 15 11:27:37 UTC 2020

On Wednesday, 15 January 2020 at 07:33:14 UTC, Walter Bright 
> [snip]
> Best practice:
>     struct S
>     {
>         throw @safe pure @nogc etc. etc. etc. etc. ...
>         ...
>     }
> and then have to remember to add to that list for every new 
> attribute. It's ugly, and people are going to hate it.

Is that only an issue for child scopes? If you have a 5000 line 
file full of functions at the module level, then you run the risk 
of having to annotate all of them if someone puts attribute: at 
the top.

It's also interesting that @safe flows through, both with @safe: 
and @safe { code }.

More information about the Digitalmars-d mailing list