@trusted attribute should be replaced with @trusted blocks

Paul Backus snarwin at gmail.com
Thu Jan 16 14:46:15 UTC 2020


On Thursday, 16 January 2020 at 10:58:33 UTC, IGotD- wrote:
> On Thursday, 16 January 2020 at 10:44:56 UTC, Patrick Schluter 
> wrote:
>>
>> No, that's where you're wrong. @trusted gives the same 
>> guarantees than @safe. The only difference is that @safe can 
>> automatically be checked and @trusted cannot. ANY memory 
>> violation in a trusted code is a BUG and the responsibility of 
>> the programmer.
>
> Then we can remove @safe all together and trust the programmer 
> to only use the safe subset of D.

The difference between "a small subset of the program must be 
manually verified in order to guarantee memory safety" and "the 
entire program must be manually verified in order to guarantee 
memory safety" is not insignificant.


More information about the Digitalmars-d mailing list