DIP 1028---Make @safe the Default---Community Review Round 1

jmh530 john.michael.hall at gmail.com
Thu Jan 2 15:29:38 UTC 2020


On Thursday, 2 January 2020 at 15:08:41 UTC, Dominikus Dittes 
Scherkl wrote:
> [snip]
>
> No, this should not be necessary. baz() compiles with @safe as 
> default, so it should not be annotated @system automatically. 
> And if it doesn't compile, that would be a bug in the original 
> code, so it is a good thing that the test now fails.

Under current behavior, baz is @system by default, but that will 
change to @safe with this DIP. If both baz and foo are annotated 
with either @safe or @system, then the program (excluding the 
UTs) compiles without errors. The problem is that the behavior of 
foo changes if baz is marked @safe rather than @system. You might 
argue that this is a bug, but it wasn't a bug originally. Your 
approach would have turned a bug-free program into a buggy one.


More information about the Digitalmars-d mailing list