Can we enable -preview=rvaluereference now?
Quirin Schroll
qs.il.paperinik at gmail.com
Fri Aug 16 23:31:49 UTC 2024
On Tuesday, 13 August 2024 at 04:23:15 UTC, Manu wrote:
> So this preview has been available for more than 5 years.
> Andrei did a keynote on it, and that seemed generally well
> received (if not
> a little tepid, because not so many people care about this).
> All the code I've written in the last 5 years doesn't work
> without this.
> I have exercised this pretty extensively in whatever flavour of
> code it is
> that I tend to write, and never had any problem. It works like
> it's meant
> to.
> I would severely struggle to return to a D without it.
>
> Can we un-preview this now?
Can we please remove it? It's a silent breaking change as it
changes the semantics of every function that has `ref` parameters
with the implicit or explicit understanding that it can't take
rvalues. Add `@universal ref`. It's a pure addition and wouldn't
break code. Manu and others could just search and replace `ref`
by `@universal ref` and be happy. Changing `ref` to make it take
rvalues never was a good idea.
More information about the Digitalmars-d
mailing list