On 2009-07-24 22:58:33 -0400, Andrei Alexandrescu
<[email protected]> said:
This is pretty clean, and in keep with the opXxx approach. Actually how
about defining property foo by defining opGet_foo and opSet_foo.
The problem with this is that it's ugly. What about this
int foo.opGet(); // getter
void foo.opAssign(int); // setter
with some support from the compiler.
It could even be exteded to support more:
int foo.opIndex(int); // foo[1];
void foo.opAddAssign(int); / foo += 1;
void foo.invert(); // special function attached to property
--
Michel Fortin
[email protected]
http://michelf.com/