DMD 2.100, bring ont he attribute soup
Timon Gehr
timon.gehr at gmx.ch
Mon May 30 22:05:30 UTC 2022
On 29.05.22 22:05, Walter Bright wrote:
> I'm aware of this, and Timon has also brought it up.
>
> It's this way to enable people to mix and match code, because I doubt
> many would even try it if it was "turtles all the way down".
Sure, but @live fails at doing that. @live is redefining the meaning of
certain built-in types within annotated functions. You can't just mix
and match, because the caller and callee may disagree about the meaning
of the function's interface. Function calls across the boundary engage
in unsafe type punning. It's like calling a function assuming a wrong ABI.
The way to enable people to mix and match code is to make ownership and
borrowing semantics additional features for user defined types to
optionally use. That's also what you want in the end, and it can
actually help make @safe more powerful along the way.
More information about the Digitalmars-d
mailing list