Programming Languages on Crack
Walter Bright
newshound2 at digitalmars.com
Thu Jun 17 10:26:07 UTC 2021
On 6/17/2021 2:56 AM, IGotD- wrote:
> How @safe, @trusted, @system work with FFI is not documented here.
>
> https://dlang.org/spec/memory-safe-d.html
>
> and I think it needs to be defined.
For FFI, the programmer of the import file for it gets to decide. You can see
that at work in the core.stdc.* files.
For ImportC, it's going to be @system. But that may get relaxed in the future by
having the compiler infer the safety by analyzing the function bodies, if they
are provided.
More information about the Digitalmars-d
mailing list