Casting in Safe D
David Held via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Nov 26 16:27:53 PST 2014
On 11/23/2014 3:12 PM, anonymous wrote:
> [...]
> And even pointer dereferencing is @safe. Invalid ones will fail
> with a segfault at run time:
> void foo(int* a) @safe {*a = 13;}
Hmm...throwing an exception is a well-defined behavior, but is
segfaulting a well-defined behavior of correct D programs? This seems
like a peculiar definition of "safe" to me...
Dave
More information about the Digitalmars-d-learn
mailing list