D not considered memory safe

Nick Treleaven nick at geany.org
Tue Jul 9 15:58:17 UTC 2024


On Monday, 8 July 2024 at 14:46:47 UTC, monkyyy wrote:
> A dull knife is the dangerous one, safety features just get in 
> the way and you'll get people learning actively awful patterns 
> in an attempt to force the tool to work

Any pattern to subvert safe involves the `@trusted` attribute 
(except for compiler bugs, which editions help to fix). 
`@trusted` is an obvious flag in code review that memory-safety 
may be violated. Grepping for `@trusted` is an easy way to narrow 
down places where memory-safety is violated.

Arguing that @trusted can be abused is a tiny problem compared to 
the far harder to detect abuse in @system by default code.


More information about the Digitalmars-d mailing list