On 12/11/2014 15:36, Nick Treleaven wrote:
Seeing as the 'scope' attribute doesn't seem to be happening any time
soon, shouldn't the compiler reject static array slicing in @safe code?
The user is then forced to think about the operation, and put the code
in a @trusted delegate if they think it is actually safe.
This is:
https://issues.dlang.org/show_bug.cgi?id=8838
Apparently it's a bit tricky to implement ATM.
yebblies:
> This is not very easy, because the compiler lowers all static array
> assignment to slice assignment, making _every_ static array assignment
> unsafe. That needs to be fixed first, and requires extensive changes
> in the interpreter.
Steven Schveighoffer:
> Can you just ban slicing that escapes the statement?