Temporally safe by default

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Apr 4 06:45:44 UTC 2024


On 04/04/2024 7:50 AM, Dukc wrote:
> On Saturday, 30 March 2024 at 02:28:02 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> As part of type state analysis work, I've been thinking about whether 
>> would we want to keep old ``@safe`` available for new editions to use.
>> I suspect that the answer is yes.
>> Not everyone wants to use DIP1000 or temporal safety.
>>
>> So what I am thinking is also an answer to ``@safe`` by default.
>>
>> Introduce a new level to SafeD, ``@tsafe``, for temporarily safe.
>>
>> Move to disable DIP1000 in ``@safe``.
>> Treat it as ``@trusted + @somelints`` instead.
>>
>> This also answers another question, how do you pass around old 
>> ``@safe`` in new editions.
>>
>> The default for all functions with bodies would be ``@tsafe``, if you 
>> see any of these four attributes, it indicates review is required.
> 
> Can you please write a code example or two? Doesn't have to be anything 
> with a nailed-down syntax, but it's really hard to be sure what you're 
> suggesting without one.

Okay so you need something a bit bigger picture for temporally safe?

My way of working would mean I would need to solve isolated and then 
temporally safe before I can do that.

It might be a while before it all comes together for me to be able to do 
it concretely.


More information about the dip.ideas mailing list