On Saturday, 10 August 2013 at 10:29:51 UTC, Stian Pedersen wrote:
To add to the mess - or maybe suggest a new approach, what
about:
class A
{
int foo();
void foo=(int a);
private foo_;
}
Then a.foo = 42; calls the foo= method. No other conversions
from a=b to a method invocation.
It may be suggested in one of these 46 pages which I haven't
read. And it'll probably break a lot of stuff.
The problem with this approach is that the getter is still
operating under the semantics of a method, but, as a property, it
should be acting like a field. An approach like this would work:
class A {