Discussion: Rvalue refs and a Move construtor for D

Manu turkeyman at gmail.com
Sat Sep 7 23:42:39 UTC 2019

On Sat, Sep 7, 2019 at 2:45 PM kinke via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> We have ref, auto ref, scope ref, return
> ref, now we're discussing @rvalue ref...

These concepts are mostly orthogonal. `auto ref` is an umbrella over
`ref` and TBD @`rvalue ref`. `scope` is orthogonal, and `return` too,
although that's slightly related to `scope`. These things work
together, but their interaction is not complexity; the fact they
interact naturally is a consequence of simple design. Complex design
is when they DON'T interact naturally, and edge cases emerge or
hard-coded interactions which are individually speced exist.
We haven't shown that here. As I see it, the conversation that's
avoiding `@rvalue ref` is the stuff that's just trying to work
semantics into special-case rule definitions, whereas `@rvalue ref` is
the purest definition that happens to exist orthogonally to all this
stuff, and naturally interacts with existing language to produce all
the desired semantics.

More information about the Digitalmars-d mailing list