--- Comment #7 from Adam D. Ruppe <> 2012-03-20 
18:53:22 PDT ---
(In reply to comment #6)
> I disagree. It's more an issue of what @property is for. Is it simply to try
> and enable a syntax where you don't need parens if you don't feel like it, or
> is it a means of providing functions that act like variables?

@property and "property syntax" aren't the same thing, and
shouldn't be confused.

D's property syntax is orthogonal to the concept of properties.
Yes, it is useful for them, but it also useful for chaining,
like seen here, and other things in the wild.

@property is to help functions act like variables, which
only relates to syntax when there's ambiguity.

The mistake with -property enforcement is it combines these
two items, while ignoring other uses like function chaining
or property/function hybrids (ones with default arguments,
e.g. if(empty) or if(empty(true)) given bool empty(bool deep = false)).

"Property syntax" should be renamed to "optional parenthesis
syntax" to help cure this confusion. Then, it would be clear
that -property's enforcement is wrong, and issues like this
would resolve themselves.

The legitimate uses work, the ambiguous properties use,
and best of all, it won't break any existing code.

Everybody wins.

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

Reply via email to