Discussion Thread: DIP 1028--Make @safe the Default--Final Review

Paolo Invernizzi paolo.invernizzi at gmail.com
Thu Mar 26 13:12:18 UTC 2020


On Thursday, 26 March 2020 at 12:18:05 UTC, IGotD- wrote:
> On Thursday, 26 March 2020 at 11:55:32 UTC, Paolo Invernizzi 
> wrote:
>>
>> At least, D has a tool, the trusted/safe attribute that simply 
>> says:
>>
>> "hey folks, I can't mechanically or manually check you code, 
>> as I don't have the sources, but, function A API description 
>> assurers me that can't corrupt memory, so I mark its 
>> declaration trusted, while function B can corrupt memory if I 
>> use the wrong parameters, so I mark it system, and I will 
>> provide a trusted D wrapper that will assure that the correct 
>> parameters are used"
>>
>> At least, that's how I read the whole things.
>>
>> Coming back to the discussion, 'not D' externs should be 
>> system by default.
>

<snip>

>  The whole @safe, @trusted, @system patchwork needs an overhaul 
> as well in order for @safe by default should be usable and 
> convenient to work with.

I respectfully disagree: I'm pretty happy with the status quo.

I would leave out of the discussion 'convenient', as anyone has 
its habits, but definitely the current situation is 'usable'.




More information about the Digitalmars-d mailing list