@trusted attribute should be replaced with @trusted blocks

Dominikus Dittes Scherkl dominikus at scherkl.de
Fri Jan 17 09:21:30 UTC 2020

On Friday, 17 January 2020 at 08:10:48 UTC, Johannes Pfau wrote:

> I'm curious, what do you think would be the ideal scheme if we 
> could redesign it from scratch? Only @safe/@system as function 
> attributes and @trusted (or @system) blocks which can be used 
> in @safe functions?

Yes, pretty much the same as in Rust.
And we can get there: just need to introduce @trusted blocks 
(which would not a change what is already possible but only a 
simplification of syntax) and changing all @trusted functions to 
@safe (with one big @trusted block around the function body).

These are pretty small changes, but would yield a much better 

More information about the Digitalmars-d mailing list