Both safe and wrong?
Luís Marques
luis at luismarques.eu
Thu Feb 7 22:33:45 UTC 2019
On Thursday, 7 February 2019 at 17:33:01 UTC, Olivier FAURE wrote:
> One way to fix this would be to forbid using @system global
> variables in @safe functions, but this would definitely be a
> breaking change, unless global variable safety is determined by
> the compiler by default (which is its own can of worms).
You are discussing evaluating the safety to the variable. Why not
evaluate the safety of the variable's initialization expression?
That is, @safe would always refer to code, just not necessarily
functions.
More information about the Digitalmars-d
mailing list