Slicing static arrays should be @system
Dmitry Olshansky
dmitry.olsh at gmail.com
Thu Nov 8 09:24:55 PST 2012
11/7/2012 5:54 AM, Jonathan M Davis пишет:
> On Wednesday, November 07, 2012 12:44:26 Daniel Murphy wrote:
>> Slicing static arrays on the stack is equivalent to taking the address of a
>> local variable, which is already illegal in SafeD.
>
> Which is what I'm arguing, but a number of people seem to really not like the
> idea of making slicing static arrays on the stack @system even though it _is_
> the same thing as taking the address of a local variable, which is @system.
>
Same here. No matter how convenient this loophole is it just can't be safe.
I recall SafeD's motto was along the lines of
"memory safety is not negotiable almost everything else is".
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list