--- Comment #4 from Jonathan M Davis <> 2012-03-20 18:14:59 
PDT ---
It seems to me that you're not looking for a property. You just think that the
empty parens are annoying and don't want to have to use them, and property
syntax is the only way to do that. Personally, I'm completely against using
@property on anything that could conceptually be a field of a class. filter and
map are very much functions and are staples of functional languages, so I'm
completely against marking them as properties, regardless of what syntactic
benefits there may be in doing so.

> Are you sure?
> Even when Bug 7722 will be fixed, I think the following code will be valid:

> @property T head(T)(T[] a) { return a[0]; }
> void main() {
>    int r1 = head([1, 2, 3]);
>    int r2 = [1, 2, 3].head();
>    int r3 = [1, 2, 3].head;
> }

Strong property enforcement would mean that @property functions can _never_ be
called with parens, and functions which aren't marked with @property must
_always_ be called with parens. That's what TDPL describes. And as such, r3
would be the only legal option. I don't know what the current implementation is
doing though.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to