On 2/4/13 2:10 AM, monarch_dodra wrote:
It was my understanding that once a function is declared a property, it
is meant to emulate a field. In such circumstance, there were talks
about plain and simply not allowing taking the address of an @property
function.

2 questions:

1. Was this proposal rejected, or have we just forgotten about it?

Well I at least haven't forgotten. Generally in D we don't want to 100% disallow doing something sensible.

2. What are the actual use cases for taking the address of a property
function?

Unless I'm mistaken, the "entire mess" of &a.b would be solved if we
simply recognized it as "but you aren't allowed to take the address of
the function b, so why have a syntax to support it anyways"? In such
circumstance, "&a.b" == "&(a.b)" == "the address of the thing obtaining
by running a.b"

Yes, if we disallowed address taking things would get a bit simpler.


Andrei

Reply via email to