DIP 1028 "Make @safe the Default" is dead

tsbockman thomas.bockman at gmail.com
Fri May 29 05:46:41 UTC 2020


On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` 
> as the first line in all your project modules, and annotate 
> individual functions otherwise as necessary. For modules with C 
> declarations, do as you think best.
>
> For everyone else, carry on as before.

Great. Thanks for accepting the community's feedback.

On the extern(C) issue, I wasn't convinced by your concerns about 
programmers taking the path of least syntactical resistance, BUT 
if that would really have been a serious problem, I think just 
keeping @system as default really is the best solution:

Ideally @safe would be brainlessly easy to use, however currently 
it can't truly do its job without some level of understanding and 
effort on the part of the user. So, better to just leave the 
whole system off by default, than try to force it on people who 
can't or won't make the effort to use it correctly.

(I say this even though I try to use @safe as much as possible in 
my own code.)


More information about the Digitalmars-d-announce mailing list