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

Dennis dkorpel at gmail.com
Tue Mar 2 14:11:51 UTC 2021


On Saturday, 27 February 2021 at 15:19:14 UTC, Kagamin wrote:
> On Saturday, 27 February 2021 at 13:32:24 UTC, Paul Backus 
> wrote:
>> The compiler will still allow you to 
>> void-initialize/overlap/reinterpret-cast an Unsafe!size_t in 
>> @safe code, because it considers size_t to be a safe type.
>
> The wrapped value still won't be accessible to safe code.

You can access the wrapped value through a union in @safe code, 
and your @trusted code can't assume anything about your Unsafe!T, 
so it does not accomplish much.



More information about the Digitalmars-d mailing list