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

jxel jxel at gmall.com
Sat Jan 4 22:35:19 UTC 2020

On Saturday, 4 January 2020 at 20:19:09 UTC, Sebastiaan Koppe 
> On Saturday, 4 January 2020 at 19:37:43 UTC, jxel wrote:
>> To use an argument that is being used against why this 
>> shouldn't happen. You can just do:
>> @safe:
>> Its nice and easy and does what you want, then you can 
>> annotate everything else that needs to with @system.
> That makes no sense to me. Instead of sane defaults I am 
> expected to prepend every file with some customary intro? And 
> even if I do that, probably no dependency I use does. Just like 
> hardly any dub package is bothered to do @safe right now.

I looked at a few of the dub packages that work with the safe 
transition, some of them just had @trusted: at the top. A lot of 
thr ones that did work were small or entirely templated. Dub 
honestly isnt the best place to look at good code anyways.

Is that your goal, you want to force @safe on people so that 
their code works with your code?

You want sane defaults at the cost of breaking almost every piece 
of code out there. As well as any tutorials, examples, and 
documentation. That's the definition of insanity.

What is a good default depends on what the person uses for D. 
Anyone that uses @system will make the same argument as you, why 
should they preface every file with @system:. Such anecdotal 
rationale isnt good enough.

> Besides, it doesn't work for everything, I have tried.

Exactly the point, people are trying to push @system: as some 
easy alternative solution. Its not.

More information about the Digitalmars-d mailing list