Simplification of @trusted
jmh530
john.michael.hall at gmail.com
Wed Jun 16 13:22:51 UTC 2021
On Wednesday, 16 June 2021 at 13:17:41 UTC, Steven Schveighoffer
wrote:
> [snip]
>
> You mean like it does now?
> [snip]
See the code example I have above. My point isn't about @trusted
per se, it's about best practices for using a @trusted code block.
In my opinion, your @trusted lambda example is a bad use of
@trusted because you're not filling in the void initialized
variable within @trusted code area. The person who is trying to
manually verify that what is in the @trusted block is actually
safe has to search for that outside the block.
More information about the Digitalmars-d
mailing list