@trusted attribute should be replaced with @trusted blocks

David Nadlinger code at klickverbot.at
Sat Jan 18 21:28:56 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?

For the record, this is also exactly what I argued for in the 
thread linked in the original post, from more than 7 years ago.

No redesigning from scratch is needed for this. Just add @trusted 
blocks and discourage (and perhaps slowly deprecate, over years) 
the use of @trusted as a function attribute.

  — David


More information about the Digitalmars-d mailing list