Discussion Thread: DIP 1028--Make @safe the Default--Final Review
Vladimir Panteleev
thecybershadow.lists at gmail.com
Fri Mar 27 02:35:56 UTC 2020
On Friday, 27 March 2020 at 02:31:13 UTC, Vladimir Panteleev
wrote:
> This applies to extern(D) declarations, too. Effectively, this
> would mean that functions with a body won't need a @safe
> annotation, but functions without a body will require it.
> However, I think this is a more correct solution despite this
> issue.
An afterthought. Because safety is part of D mangling, body-less
extern(D) declarations could be assumed to be @safe. A mismatch
(assumption of @safe but a @system implementation) will result in
a linker error.
This applies to all mangling schemes which can represent @safe,
which is only extern(D) at the moment. So, if any calling
convention would be special in this regard, it would be extern(D).
More information about the Digitalmars-d
mailing list