DIP 1016--ref T accepts r-values--Formal Assessment
Nicholas Wilson
iamthewilsonator at hotmail.com
Thu Jan 24 09:24:19 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:
>
> https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1016.md
> void atomicIncrement(ref shared long x);
> atomicIncrement(myInt);
Raises a good point, not covered by @disable where the intent is
to modify it and modifying a temporary is wrong. `out ref`
perhaps?
More information about the Digitalmars-d-announce
mailing list