@system blocks and safer @trusted (ST) functions

claptrap clap at trap.com
Wed Jul 28 17:25:18 UTC 2021


On Wednesday, 28 July 2021 at 16:57:41 UTC, Bruce Carneal wrote:
> On Wednesday, 28 July 2021 at 12:49:28 UTC, Paul Backus wrote:
>> On Wednesday, 28 July 2021 at 08:40:47 UTC, claptrap wrote:
>>
> I see this as two problems with a common solution, rather than 
> a conflict.
>
> Problem 1: @trusted lambdas within @safe functions are very 
> convenient but tricky.
>
> Problem 2: we want more practical @safety in the evolving dlang 
> code base with as close to zero additional programming load as 
> we can manage.
>
> Rather than post some half-baked evolution of the original 
> proposal sketch here, I'll wait til the back and forth with Joe 
> converges.  The current candidates there are, in my view, both 
> simpler and more powerful than anticipated in the forum 
> discussion.  The biggest open question is how things should 
> evolve to reduce/eliminate meta programming friction (thanks 
> for the caution Steven).
>
> Unless we unexpectedly find ourselves with a lot of time on our 
> hands, ETA on the DIP is still the end of the year.

Do you have ideas on how to stop unsafe blocks accessing the 
variables from the surrounding scope? Is that even a goal for the 
DIP?


More information about the Digitalmars-d mailing list