Simplification of @trusted
Bruce Carneal
bcarneal at gmail.com
Wed Jun 16 21:55:20 UTC 2021
On Wednesday, 16 June 2021 at 21:32:46 UTC, Paul Backus wrote:
> On Wednesday, 16 June 2021 at 21:26:08 UTC, Bruce Carneal wrote:
>> I like the notion that others have mentioned of @safe checking
>> by default within @trusted code (which would require @system
>> blocks to disable checking). Perhaps we could adopt an opt-in
>> strategy where such @safe checking is triggered by the
>> presence of an @system block.
>
> Under this proposal, @system lambdas/blocks within @trusted
> code would have the exact same semantics as @trusted
> blocks/lambdas within @safe code currently do. It's pure
> bikeshedding.
The difference is in ease of maintenance. Things should nest
properly wrt human comprehension.
In the "bikeshedding" proposal @safe code need not be checked
manually while the @trusted code, which already needed to be
checked manually, will now enjoy a narrowing of focus.
Perhaps I'm missing something here. If so, please enlighten me
as to the advantages of the "non-bikeshedding" approach and/or
the errors in my logic.
More information about the Digitalmars-d
mailing list