DIP 1016--ref T accepts r-values--Formal Assessment
iamthewilsonator at hotmail.com
Thu Jan 24 08:48:37 UTC 2019
On Thursday, 24 January 2019 at 07:18:58 UTC, Mike Parker wrote:
> Walter and Andrei have declined to accept DIP 1016, "ref T
> accepts r-values", on the grounds that it has two fundamental
> flaws that would open holes in the language. They are not
> opposed to the feature in principle and suggested that a
> proposal that closes those holes and covers all the bases will
> have a higher chance of getting accepted.
> You can read a summary of the Formal Assessment at the bottom
> of the document:
>> T __temp0 = void;
>> fun(__temp0 := 10);
> The first problem the Language Maintainers identified with this
> approach is that the rewrite is from an expression to a
> statement, rendering it invalid.
> The expression should be rewritten as an expression to clarify
> how it behaves in larger expressions.
But it does, or at least gives an example of:
The statement the expression is part of is "enscoped" and the
temporaries live in the scope of that statement.
More information about the Digitalmars-d-announce