disable all member function calls for rvalues?
Kagamin
spam at here.lot
Fri Dec 25 02:43:51 PST 2009
Andrei Alexandrescu Wrote:
> > Andrei Alexandrescu Wrote:
> >
> >>> In contrast with the original example this is not a bug.
> >> I think it is to the extent (a) it does nothing (b) the syntactic
> >> equivalent code involving fields does something. It's an egregious
> >> breakage of consistency because properties were meant to be
> >> generalizations of fields in the first place.
> > foo().obj.unlink();
> > foo().obj2().unlink();
>
> File does not have an unlink member but I get your point. As I said,
> refusing to bind ref to rvalues disables a few valid uses. I am willing
> to renounce those few uses.
So you deliberately want to break consistency between fields and properties? As I understnd, .obj will be allowed and .obj2 will be disallowed?
More information about the Digitalmars-d
mailing list