-preview=safer for D
Timon Gehr
timon.gehr at gmx.ch
Sat Dec 14 21:52:13 UTC 2024
On 12/14/24 22:36, Walter Bright wrote:
> Safer offers no guarantees of memory safety.
I am aware what it does and why.
> 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
>
> You are an expert, and I doubt it will be of much value to you as you
> are already an expert in what is safe and what isn't.
> ...
Well, I sometimes use dependencies. Flagging some of the more shady
things they do can be useful, and I end up forking most of them anyway.
Sometimes I contribute to code bases that also have other people working
on them. These goals often enough align with mine even if I am
personally already an expert.
> Memory safety, as I predicted a few years back, is now a critical
> feature of a programming language, and whatever practical way we can
> move D in that direction we must do.
I agree and I am on board with the goals and also the general direction.
I noted two weaknesses of this specific proposal that limit its ability
to address the three goals you noted above. The more important one is
that it does not apply at all to large categories of code such as templates.
More information about the Digitalmars-d
mailing list