Safety, undefined behavior, @safe, @trusted
Michel Fortin
michel.fortin at michelf.com
Thu Nov 5 11:57:48 PST 2009
On 2009-11-05 13:33:09 -0500, Walter Bright <newshound1 at digitalmars.com> said:
> Safety seems more and more to be a characteristic of a function, rather
> than a module or command line switch. To that end, I propose two new
> attributes:
>
> @safe
> @trusted
Looks like a good proposal.
That said, since most functions are probably going to be safe, wouldn't
it be better to remove @safe and replace it by its counterpart: an
@unsafe attribute? This would make things safe by default, which is
undoubtedly safer, and avoid the unnecessary clutter of @safe
annotations everywhere.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list