dip1000 and preview in combine to cause extra safety errors

Walter Bright newshound2 at digitalmars.com
Wed Jun 8 23:41:58 UTC 2022


On 6/8/2022 1:49 PM, Dukc wrote:
> The philosophy is to force to be explicit in the simplest cases that are almost 
> always errors, but not trying to seriously prevent the escape.

Yup. That simple check is also what the original D1 compiler did (and what C and 
C++ compilers do). Making `scope` work to plug all the holes was a vast increase 
in technology.

`scope` engenders a lot of complaints, too, because it is ruthless and demanding 
and annoys people with the annotations.

Fortunately, D gives you a choice - use @safe and the compiler will kick in and 
demand that the code stays in its lane. Or use @system, and do whatevs, and the 
onus is on you to be careful with that saw as the blade guards are removed.


More information about the Digitalmars-d mailing list