Discussion: Rvalue refs and a Move construtor for D

kinke noone at nowhere.com
Thu Sep 5 21:52:56 UTC 2019


On Thursday, 5 September 2019 at 21:31:59 UTC, Manu wrote:
> We lose by-val calling semantics, which are more efficient for 
> small
> struct's (most things), and certain classes of wide-registers in
> various architectures (impossible to codify the proper rules in 
> the
> language).

No, I've explicitly stated that this obviously only affects 
non-PODs and large PODs. On Win64, `large` is already anything > 
8 bytes. Of course we don't want to pass an int by ref.

> You talk about C++ rval references as if they're complex, but 
> they're
> really not.

For people with C++ background they probably aren't. I doubt 
it'll increase the interest in D from Java/C#/JavaScript people.
[And a great design IMO doesn't include `T&&` meaning different 
things for a templated function and a regular function, but 
that's off-topic.]


More information about the Digitalmars-d mailing list