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

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 2 17:38:18 UTC 2020


On Thu, Jan 02, 2020 at 05:27:22PM +0000, Arine via Digitalmars-d wrote:
> >  Fortunately, the solution is easy, although tedious: annotate
> >  functions that aren't safe with @trusted or @system.
> 
> If you could annotate the module with @system to use the old behavior,
> this will ease the transition period. This is better than simply
> having a compiler flag that changes behavior, as you can see in the
> code that is using the old behavior. You can also disable it per
> module, not either on or off for everything.
> 
> 
>     @system module std.stdio; // or similar

You can already do this today:

	module blah;
	@system:
	... // everything here defaults to @system

Of course, today this does nothing because @system is the default, but
you can already mark an entire module as @safe the same way, for
example.


T

-- 
This is not a sentence.


More information about the Digitalmars-d mailing list