On Borrow Checking
Walter Bright
newshound2 at digitalmars.com
Sat May 10 20:09:08 UTC 2025
On 5/10/2025 5:10 AM, Manu wrote:
> Okay, so then why should `scope` need `@safe`? It's an additional attribute
> added in its own right; there's no apparent value to requiring a SECOND
> attribute's presence in order to make the first attribute take effect.
> `scope` should work when you write `scope`. If you don't want scope checking,
> don't write `scope`...?
Because in @system code, you can do whatever you want. But to signal to the
caller that it is `scope`, add the attribute to the parameter list. It's up to
the programmer to live up to that promise.
@system could should really be minimized in a properly designed program. That's
why we're moving to safe by default.
More information about the Digitalmars-d
mailing list