Safe mode in D?

Jonathan M Davis jmdavisProg at gmx.com
Fri Oct 18 10:38:17 PDT 2013


On Friday, October 18, 2013 10:05:39 H. S. Teoh wrote:
> It would break existing code.
> 
> But if we're gonna do it, I say we should go all the way: make @safe,
> pure, and nothrow default, and require annotations only for @system,
> impure, throwing. If we advertise D as "do the right thing by default,
> but allow the user to override it if necessary", then we should make all
> code @safe, pure, and nothrow by default. (Well, at the very least @safe
> and pure, I'm not as sure about making nothrow default. But it would be
> nice for those performance-conscious people who don't like the fact that
> throwing functions require extra stack frame setup, which thus impacts
> performance.)

Yeah, if we could go back, it would be great to do something like that, but I 
think that it's pretty clear that it would be too much of a breaking change at 
this point.

- Jonathan M Davis


More information about the Digitalmars-d mailing list