DIP 1016--ref T accepts r-values--Community Review Round 1

Manu turkeyman at gmail.com
Wed Jul 25 18:17:00 UTC 2018


On Wed, 25 Jul 2018 at 10:45, Atila Neves via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> > ...all that said, we understand that there is value in
> > inhibiting calls with rvalues in some cases. We address this in
> > a very nice way with @disable, which is also nicely symmetrical
> > such that the limitation may by applied to rval or lval's.
>
> I like using @disable this way. It's unclear to me the impact on
> existing code that doesn't already have a @disable since it
> wasn't needed before.
>
> I'm not against the DIP - I think easier interop with C++ is a
> good thing and this would help it. I have to think a bit more
> about the points Jonathan has brought up, because it sounds like
> there's a possibility that bugs might be introduced if the DIP
> goes through, at least as-is. I'm not sure.

FWIW; I presented a further solution for the property case, which I
think is a good improvement for properties in general (it will address
other constructions of this same issue that aren't in conjunction with
ref).
It addresses the issue Jonathan raised in the domain where the problem
exists, and leaves unrelated problems outside of this DIP's problem
space.


More information about the Digitalmars-d mailing list