Simplification of @trusted

Per Nordlöw per.nordlow at gmail.com
Sun Jul 11 08:36:33 UTC 2021


On Wednesday, 16 June 2021 at 15:37:22 UTC, H. S. Teoh wrote:
> This isn't the first time it was suggested.  Way back when, it 
> was brought up and rejected because Walter thought that 
> @trusted blocks should be discouraged, and therefore should be 
> ugly to write.  It was extensively argued, but Walter preferred 
> the "trusted lambda idiom", precisely because it was ugly, 
> required effort to write, and therefore deters casual (ab)uses 
> of @trusted.

Rust, C#, V all use

     unsafe { ... }

Can we please allow

     unsafe { ... }

, Walter?

It's trivial to grep for `@trusted` to find all possible safety 
violations in projects.


More information about the Digitalmars-d mailing list