I think that would be good enough if you could access the value by just evaluating the object, ie if you could remove the #define from the code and still use foo the same way as if it had been there.
/ Marcus Agehall (Scanian)
Previous text:
2003-12-20 14:28: Subject: C#-like properties
Something like this?
class Property { mixed value; mixed `->(string id) { return value; } mixed `->=(string id, mixed v) { value=v; return v; } }
int main() {
mixed foo = Property(); #define foo foo->bar
// ...
}
/ Martin Nilsson (saturator)