@system blocks and safer @trusted (ST) functions

Bruce Carneal bcarneal at gmail.com
Mon Jul 26 15:13:36 UTC 2021


On Monday, 26 July 2021 at 14:18:29 UTC, Bruce Carneal wrote:
> On Monday, 26 July 2021 at 13:26:56 UTC, Steven Schveighoffer 
> wrote:
>> On Sunday, 25 July 2021 at 12:05:10 UTC, Steven Schveighoffer 
>> wrote:
>> ...
>
> Yes. You have argued, persuasively, that the language should 
> infer these properties and others.  IIUC, in a pervasive 
> inference scenario, @safe/@trusted/@nogc/... annotations would 
> function as programmer assertions: "if this property doesn't 
> hold, error out".  Couple this with Ali's @trusted-by-default 
> proposal and you'd be living in a wonderful world (he says 
> before walking off in to the unknown! :-) ).
>

Rather, "if this compiler can't prove that the property holds, 
error out".



More information about the Digitalmars-d mailing list