<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/1/25 deadalnix <span dir="ltr"><<a href="mailto:deadalnix@gmail.com" target="_blank">deadalnix@gmail.com</a>></span><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

@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.<br>

</blockquote></div><br></div><div class="gmail_extra">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.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">module abc;</div><div class="gmail_extra">@property int foo(int n);</div><div class="gmail_extra"><br></div><div class="gmail_extra">void main() {</div><div class="gmail_extra">
  foo = 1;  // top-level property setter</div><div class="gmail_extra">  1.foo;  // property getter with UFCS</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">We cannot distinguish the two usages without adding any new features.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Kenji Hara</div></div>