Safety, undefined behavior, @safe, @trusted

Michel Fortin michel.fortin at michelf.com
Thu Nov 5 14:48:00 PST 2009


On 2009-11-05 16:40:11 -0500, "Adam D. Ruppe" <destructionator at gmail.com> said:

> Which is going to work best for existing code? With Walter's idea, you
> compile it, then fix functions piece by piece to make them safe. Since your
> other unsafe functions can still call them, the change is localized and you
> get safer with each revision.
> 
> With safe by default, you'd probably make existing code compile just by
> slapping @trusted: at the top and being done with it. That's not actually
> safe - you're just telling the compiler to shut up about it.

That's a great point. Thank you Adam. I changed my mind, let's keep 
unsafe as the default.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list