Simplification of @trusted
Timon Gehr
timon.gehr at gmx.ch
Wed Jun 16 21:46:17 UTC 2021
On 16.06.21 23:32, 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.
I wouldn't even bother if that was the case.
The semantics is different if you consider code evolution and properly
assigning blame for bugs.
@safe code is code you don't have to check for memory safety errors.
You can try to move the goal posts, but the title of this discussion is
"simplifying @trusted", not "redefining @safe".
More information about the Digitalmars-d
mailing list