Discussion: Rvalue refs and a Move construtor for D
Manu
turkeyman at gmail.com
Sun Sep 8 03:21:06 UTC 2019
On Sat, Sep 7, 2019 at 7:10 PM Suleyman via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Sunday, 8 September 2019 at 01:46:11 UTC, Manu wrote:
> > I understand where you're coming from, but this opens up an
> > enormous can of worms and widens the scope of the conversation
> > enormously... I think we have about a 15% chance of being
> > successful with an @rvalue ref proposal as is, and I feel like
> > if we try and expand that to a type-constructor and make it
> > applicable to pointers, we fall to around 0.01% change of
> > success.
> >
> > I spend too much time and energy here as it is. I would advise
> > against doing something that cuts your chances of success by
> > 1000x, and I couldn't personally make the time to argue in
> > favour :/
>
> I didn't intend to just copy C++ blindly. If we did we wouldn't
> have D we would still be using C++. If it's a complete solution
> it has more chance to make it in D. If it's just a knock off of
> C++ it probably won't.
Actually, why doesn't it naturally work with pointers?
The same way `scope` applied to pointers or ref's or anything with
references, shouldn't `@rvalue` have the same attribution semantics as
`scope` for instance?
I guess you're right; if it didn't naturally apply to pointers the
same way `scope` does, it would be a weird kind of edge case.
The application of the attribute should behave the same as `scope`.
More information about the Digitalmars-d
mailing list