Safer D first draft
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Mon Sep 23 10:38:10 UTC 2024
Thanks for the reminder, ``a.ptr`` is a perfectly safe operation, it
exists solely because we do not have type state analysis to prevent
dereferencing null. It can be a valid argument to non-D code both as
null and non-null. That check should be removed.
I see there is one other example given, for escape analysis. This is
where I actually see the value in such a proposal and have thought about
as part of my own proposals.
Specifically for type state analysis, it is never correct to dereference
null, therefore it should never be allowed in ``@system` code.
More information about the dip.development
mailing list