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

Atila Neves atila.neves at gmail.com
Thu Mar 4 18:51:50 UTC 2021


On Thursday, 4 March 2021 at 18:47:28 UTC, Steven Schveighoffer 
wrote:
> On 3/4/21 1:23 PM, Atila Neves wrote:
>> [...]
>
> At the very top of the DIP:
>
> "D's memory safety system distinguishes between safe values, 
> which can be used freely in @safe code without causing 
> undefined behavior, and unsafe values, which cannot. A type 
> that has only safe values is a safe type; one that has both 
> safe and unsafe values is an unsafe type."
>
> Unsaid here is that it doesn't matter where it comes from 
> (@safe or @system). This is how they are defining "safe types" 
> and "unsafe types". Everything follows from that.
>
> Given that definition, pointers are unsafe.
>
> -Steve

That makes sense, but I'm not sure that's how we *should* define 
it, given that pointers are memory-safe in @safe code.


More information about the Digitalmars-d mailing list