-preview=safer for D

Paul Backus snarwin at gmail.com
Sun Dec 15 00:39:00 UTC 2024


On Saturday, 14 December 2024 at 21:36:17 UTC, Walter Bright 
wrote:
> Safer offers no guarantees of memory safety. I view it as a 
> tool to:
>
> 1. provide some lint-like flagging of suspicious constructs
>
> 2. help educate new D users to safer practices
>
> 3. make it easier to transition to using @safe

If these are the goals, maybe it would make more sense for failed 
checks to result in warnings rather than errors.

That way, you can get the informational/educational value of 
-preview=safer without breaking your build, and you're only 
forced to satisfy the checks once you actually decide to 
transition to @safe.


More information about the Digitalmars-d mailing list