[Issue 12941] Everything should be @unsafe by default, and explicitly vetted (and documented) as @safe
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 19 16:19:55 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12941
Jonathan M Davis <jmdavisProg at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmdavisProg at gmx.com
--- Comment #7 from Jonathan M Davis <jmdavisProg at gmx.com> ---
> Also, slicing of static arrays should be considered @system, because unless we implement scope properly, they will break @safe-ty.
And even then, they still have to be @system unless they're immediately passed
as a function argument to a parameter that's marked scope. The same goes for
taking the address of a local variable. Essentially, the two operations are
identical, save for the fact that slicing a static array also involves copying
the length.
--
More information about the Digitalmars-d-bugs
mailing list