DIP 1028 "Make @safe the Default" is dead

Nick Treleaven nick at geany.org
Sat May 30 11:39:10 UTC 2020


On Friday, 29 May 2020 at 21:18:13 UTC, Walter Bright wrote:
> On 5/29/2020 2:07 AM, Timon Gehr wrote:
>> It would be great if `@safe:` did not affect declarations that 
>> would otherwise infer annotations.
>
> The idea is the simple, general rule that:
>
>   attribute declaration;
>   attribute { declaration; }
>   attribute: declaration;
>
> behave the same way.

To preserve this, then please can we have `@safe module foo;`. 
This would change the default on a module basis to @safe, but 
still infer e.g. function template bodies as @system where 
necessary. This feature would allow modules from different 
projects, including ones written before this feature would be 
added can coexist happily. There would be no breakage, unlike DIP 
1028 (which I BTW would support at a lower preference than the 
above feature, apart from unmarked extern(C) declarations being 
@safe).


More information about the Digitalmars-d-announce mailing list