@trusted attribute should be replaced with @trusted blocks

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Jan 15 21:14:16 UTC 2020


On Wednesday, 15 January 2020 at 19:49:53 UTC, Joseph Rushton 
Wakeling wrote:
> No.  @trusted is about saying "This function should be safe to 
> use, but that safety has been designed by the developer rather 
> than being automatically verifiable by the compiler."

Could make sense if you only could call @trusted from @trusted... 
If you can call @trusted from @safe then it makes no sense 
whatsoever.

If you view attributes as something for external APIs then it 
makes no sense to distinguish between @trusted and @safe.

It is just noise that conveys nothing of substance.



More information about the Digitalmars-d mailing list