D not considered memory safe

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Jul 11 06:31:47 UTC 2024


On 11/07/2024 5:59 PM, Walter Bright wrote:
> 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.

Yeah I get that, but that is a major problem for things like std.algorithm.

There will be situations without a migration path forward.


More information about the Digitalmars-d mailing list