-preview=in might break code
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Sat Oct 3 17:17:32 UTC 2020
On Saturday, 3 October 2020 at 16:56:06 UTC, Mathias LANG wrote:
> To put it differently: Why is `auto ref` acceptable but `in` is
> not ?
Aren't `auto ref` parameters more intuitive in their behaviour,
though? That the parameter will be passed by ref if it's an
lvalue, and by value if it's an rvalue (in which case the only
way it can mutate under your feet is if it wraps by reference
some other app state)?
Unless I'm missing something, that's much more predictable and
shouldn't suffer from implementation-dependent differences in the
way the preview `in` design does.
More information about the Digitalmars-d
mailing list