D not considered memory safe

Walter Bright newshound2 at digitalmars.com
Thu Jul 11 05:59:08 UTC 2024


On 7/10/2024 7:33 PM, Richard (Rikki) Andrew Cattermole wrote:
> The point is, once @safe is the default, that capability goes away without @infer.

I understand that.

First, @system code should be a very small part of a program. If complex things 
are being done with layers of templates in @system code, I propose that is a 
badly designed program.

Second, just declare them @trusted until one gets around to a proper refactoring.

In fact, I've been doing just that. Adding @safe: at the top, and then 
everything that fails to compile gets marked @trusted. Eventually, refactor the 
code as time permits.

No need for Yet Another Attribute.


More information about the Digitalmars-d mailing list