Discussion Thread: DIP 1035-- at system Variables--Community Review Round 1
ag0aep6g
anonymous at example.com
Wed Jun 17 14:59:13 UTC 2020
On 17.06.20 16:27, Andrei Alexandrescu wrote:
> Not even close. The crux of the matter is that forgetting to add @system
> to that variable makes @safe code do unsafe things with no diagnostic
> for the compiler. That's a problem with the safety system, regardless of
> the adoption of this DIP. We can't say "@safe D code is safe, except of
> course if you forget to insert @system on key variables, in which case
> it won't be with no warning."
If you forget @system on a safety-critical variable, then an @trusted
function that relies on it does not have a safe interface and is invalid.
We're saying "@safe D code is safe, except when you make a mistake in
@trusted code". Relying on a non- at system variable is such a mistake.
More information about the Digitalmars-d
mailing list