DIP28, on properties, availabel for destruction as well
Jacob Carlborg
doob at me.com
Thu Feb 28 00:02:04 PST 2013
On 2013-02-28 04:00, deadalnix wrote:
> The proposal is to rewrite that to auto a = b.setter(3);
>
> Its value is whatever the setter returns.
Then setters always must return a value. I think it would be better to
have the compiler rewrite the expression to return what the getter returns.
> Error, w.getter is not an lvalue.
Then you cannot freely change a field to a property.
> That would be an error as well, for the same reason.
That should have of course looked like:
w.setter = __tmp;
If this rewrite is not done then again, you cannot freely change a field
to a property.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list