Discussion Thread: DIP 1035-- at system Variables--Community Review Round 1

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Wed Jun 17 15:54:13 UTC 2020


On 6/17/20 10:59 AM, ag0aep6g wrote:
> 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".

This has been the case before.


More information about the Digitalmars-d mailing list