Michel Fortin wrote:
On 2009-07-28 22:33:53 -0400, Walter Bright <newshou...@digitalmars.com>
said:
The issue is what if b is a property, returns a temporary object, and
that temp's .c field is uselessly set to 3?
It's a classic problem with properties that are implemented as functions.
With the local namespace approach I propsed a little while ago, you
could allow "subproperties":
namespace a {
namespace b {
namespace c {
int opGet() {...}
void opAssign(int) {...}
}
}
}
We're looking for a modular solution - one that allows one person to
define the type of b and another person to define the type of a, which
has a member b.
Andrei