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

mipri mipri at minimaltype.com
Fri Jan 3 22:06:53 UTC 2020

On Friday, 3 January 2020 at 21:53:29 UTC, Guillaume Piolat wrote:
> On Friday, 3 January 2020 at 21:24:03 UTC, mipri wrote:
>> Another result: instead of the status quo of "mark something
>> @safe -> get explosion of errors because so much code is
>> @system unnecessarily -> realize what a chore it would be to
>> make @trusted interfaces to this code -> remove @safe", you're
>> more likely to not have problems at all because the code you
>> call is already @safe because that's the default.
> Which is another way to say you will loose productivity all the 
> time, before you know if that software has any business being 
> good in the first place.
> Companies write lots of small tools, many of which can (and 
> should) be pretty crappy! Else it's just bad focus.

But isn't this kind of code even more likely than most code to
be @safe? This isn't @nogc. It's just these restrictions:


The big one is "no calling system functions" and this DIP
will do a lot to alleviate the pain of that restriction. The
other stuff, you run into when you're trying to be clever or
improve code. Swap out the unnecessary copies of this idup by
casting stuff to immutable, e.g.

More information about the Digitalmars-d mailing list