@safe status
Michel Fortin
michel.fortin at michelf.com
Mon Feb 8 13:13:45 PST 2010
On 2010-02-08 15:51:35 -0500, bearophile <bearophileHUGS at lycos.com> said:
> What's the point of having safe code? If safe code can run unsafe code
> in a so simple and clean way (with no casts, etc), then there's little
> point in having safe annotations.
Safe functions are safe only when you give them safe arguments. Passing
an unsafe delegate to a safe function is not much different from
passing a pointer: both can cause memory corruption. But unsafe
functions can give whatever pointer they want to a safe function, so
why that restriction for delegates? When is that restriction helpful?
I think that restriction is not helpful and only gets in the way. But
please show me otherwise.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list