-preview=in might break code
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Oct 2 18:33:10 UTC 2020
On Friday, 2 October 2020 at 17:31:06 UTC, Steven Schveighoffer
wrote:
> Yes, the problem is the "sometimes ref". Because ref changes
> the semantics.
>
> I read it as, in means by ref, unless the compiler can prove
> it's the same to pass by value, and that is more efficient. But
> if it's for *optimization*, it shouldn't change the effective
> semantics. The optimizer should be invisible.
>
> In practice, I don't think the compiler can prove that.
A good backend most certainly can? This ought to be a pure
backend issue and not affect the fontend at all if the separation
front/back is as it should be.
Calling conventions do not belong in a language spec...
More information about the Digitalmars-d
mailing list