The only way that @safe could really be applicable would be if it became @system to take the address of a local variable or to slice a static array. And perhaps it should be, but that and catching the most obvious cases are all that the compiler could do to catch this for you.

Hmmm, you could have the compiler add a runtime check and see if slices are stack allocated (EAX >= ESP I think), then quit with an error, or alternatively it would make a copy afterwards, or at least a warning.

Reply via email to