DIP 1028---Make @safe the Default---Community Review Round 1

Atila Neves atila.neves at gmail.com
Fri Jan 3 18:22:00 UTC 2020


On Friday, 3 January 2020 at 14:36:26 UTC, Adam D. Ruppe wrote:

> Good: I suspect a majority of D code already qualifies for 
> @safe.

Correct.

> The pain impact is likely to be small,

This is also my prediction.

> and with the default set correctly, more libraries will work 
> and those benefits can bubble up to user code.

Correct.

> Bad: It is a bit of a hassle to deal with breakage when it 
> comes up and the benefit is likely to be small, since most code 
> is already free of the trouble it aims to solve.

This can be gauged easily. Walter already has a PR, all we (me in 
all likelihood) have to do is try it on Phobos then packages from 
code.dlang.org.

> I fall a bit on the "yes" side since I do think the good 
> slightly outweighs the bad.

@safe by default is strategically important for the language.

> But let's not unfairly trash D as it stands to make this case 
> stronger. We're already streets ahead of C++ even without this 
> dip so talking about bad experiences and overall statistics 
> from C and C++ don't necessarily apply to D.

One never knows how code in the wild is written, but with DIP1000 
turned on and using only the GC, it's extremely rare for me to 
write code that doesn't qualify as @safe even if not explicitly 
marked that way (but I always do).




More information about the Digitalmars-d mailing list