new DIP39: Safe rvalue references: backwards compatible, safe against ref/nonref code evolution, compatible with UFCS and DIP38
timotheecour
timothee.cour2 at gmail.com
Sun May 12 16:50:50 PDT 2013
> OK, First remark on the way the DIP is presented. You start
> right away with example which make it hard to understand o
> general big picture.
I've clarified differences with the rejected DIP36 in the
abstract and added more context.
> Second, ^ is not unused in D and the DIP introduce an ambiguity
> here.
Indeed, it's used in XOR; I've clarified this point. It should
still be unambiguous as XOR is binary.
> Making the temporary creation explicit is an idea that hasn't
> been explored that much. I have to think more about it.
Could you point out to any potential pitfalls, when used as
described in section 'Implementation details' ?
I've also incorporated a useful suggestion from Dmitry S, which
is to allow LV^ to create a temporary from an lvalue reference,
as oppose to result in compile error in that case, see the
updated DIP.
More information about the Digitalmars-d
mailing list