Both safe and wrong?

Olivier FAURE couteaubleu at gmail.com
Fri Feb 8 19:53:54 UTC 2019


On Thursday, 7 February 2019 at 22:33:45 UTC, Luís Marques wrote:
> 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.

Yes, that's what I meant by "variable safety". In retrospect, 
that was a little ambiguous.


More information about the Digitalmars-d mailing list