Discussion Thread: DIP 1035-- at system Variables--Community Review Round 2

Dukc ajieskola at gmail.com
Tue Mar 2 15:34:31 UTC 2021


On Tuesday, 2 March 2021 at 13:56:28 UTC, Dennis in the feedback 
thread wrote:
>
> There is no disagreement, the rationale text you mention 
> describes the situation before DIP 1035, while the description 
> describes the situation after DIP 1035.

How is this piece from the rationale section describing the 
situation before DIP1035?

"Since the initialization expression cast(int*) 0xDEADBEEF would 
not be allowed in a @safe function, and since the initial value 
of y is unknown, the compiler should annotate variables x and y 
as possibly containing an unsafe value, so they cannot be 
accessed in a @safe function. Only z is known to have a safe 
initial value in this case, so the compiler could allow access to 
it in @safe code."



More information about the Digitalmars-d mailing list