Transition to @safe by default

Brad Roberts braddr at puremagic.com
Tue Jul 30 20:17:52 UTC 2024


On 7/30/2024 12:19 PM, Richard (Rikki) Andrew Cattermole via dip.ideas 
wrote:

(this isn't directed at anyone in particular, and definitely not 
Richard, just happens to be who wrote the below quote this time)

> Yes, I didn't state this but this is how I've always thought as it is 
> based upon what the compiler can prove.

It hasn't come up in a long time, so this is a reasonable time to remind 
everyone that the compiler doesn't prove @safe-ty.  It checks for 
not- at safe-ty.  The logic is backwards from what it 'should' be, imho. 
Instead of only allowing known to be safe code, it blocks known to be 
problematic code.  Meaning that omissions in the logic default to open 
rather than closed.

Assuming perfect no-bugs code, the distinction doesn't matter.  But no 
complex system is perfect.  Fixing that part of the implementation might 
make for a great summer of code project for some eager student.

Later,
Brad


More information about the dip.ideas mailing list