Kagamin wrote:
Andrei Alexandrescu Wrote:

I think, possible solution is to disallow assign operations on the return 
value: =, +=, *=, ~=, ++ etc, but read operations should be allowed and 
functions should be callable by their symbolical names.
Won't help. Consider:

a.b.c.d.e.f = g;

If anywhere on the path an rvalue is created, the code is useless busywork.

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.

Andrei

Reply via email to