D not considered memory safe
Walter Bright
newshound2 at digitalmars.com
Thu Jul 11 16:16:25 UTC 2024
On 7/10/2024 11:31 PM, Richard (Rikki) Andrew Cattermole wrote:
> Yeah I get that, but that is a major problem for things like std.algorithm.
>
> There will be situations without a migration path forward.
Pass @trusted arguments to the templates.
The truth is about every piece of existing code not already annotated is going
to fail to compile with safe-by-default. That's been my experience, at least.
The migration path is to mark the stuff with @trusted. You can see that in the
dmd source code.
More information about the Digitalmars-d
mailing list