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

bachmeier no at spam.net
Thu Jan 2 18:13:55 UTC 2020

On Thursday, 2 January 2020 at 16:19:00 UTC, jmh530 wrote:
> On Thursday, 2 January 2020 at 15:25:15 UTC, bachmeier wrote:

> Your @legacy is really no different than putting @trusted: at 
> the top. I agree with others who are concerned about marking 
> all current code as @trusted, rather than @system.

It would be treated that way. In practice, it would mean 
something very different from @trusted, because all you can infer 
from the lack of attributes at this point is that there was never 
a decision made with respect to @safe, @trusted, or @system. If 
you put @trusted at the top of a file, that should mean you've 
made the decision to call it @trusted after evaluating and 
testing the code. Going forward, anything marked @trusted really 
would be @trusted if we had @legacy.

> To your other point about it being ugly to mark main as 
> @system, I recall Walter considering, at some point, keeping 
> main as @system. Perhaps give main more time before changing 
> the default to @safe?

That would certainly be better. It would still not prevent 
unnecessarily breaking (many millions of lines of) working code.

More information about the Digitalmars-d mailing list