2013/1/25 deadalnix <deadalnix@gmail.com>
@function seems like an extra complication. Ambiguity between setter and getter for @properties when UFCS come into play are not solved. Functional style is impaired as you can't pass regular function around, just @function . You'll still find trap in generic code around the behavior of regular functions.

That's a good point. We need to solve another ambiguity about top-level @property function which have a parameter, between top-level property setter and UFCS property getter.

module abc;
@property int foo(int n);

void main() {
  foo = 1;  // top-level property setter
  1.foo;  // property getter with UFCS
}

We cannot distinguish the two usages without adding any new features.

Kenji Hara