DIP1028 - Rationale for accepting as is

Paul Backus snarwin at gmail.com
Sat May 23 16:00:01 UTC 2020


On Saturday, 23 May 2020 at 15:33:05 UTC, H. S. Teoh wrote:
> On Sat, May 23, 2020 at 10:55:40AM +0000
>
> And this is precisely why I proposed that what we need is a way 
> for the compiler to mechanically check all code *except* 
> certain specified blackboxes that are skipped over.  Then you 
> can have your calls to unvetted C functions and still have the 
> mechanical checks enabled for the rest of your code.
>
> This is also related to @trusted blocks inside a function, the 
> intention of which is to limit the @system code to as small a 
> surface area as possible while enabling @safe checks for the 
> rest of the function.
>
>
> T

@system void foo(...) {
     () @safe {
         // mechanically checked
     }();
     // not checked
}


More information about the Digitalmars-d-announce mailing list