<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/1/25 Adam Wilson <span dir="ltr"><<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>></span><br><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">
On Thu, 24 Jan 2013 17:15:09 -0800, kenji hara <<a href="mailto:k.hara.pg@gmail.com" target="_blank">k.hara.pg@gmail.com</a>> wrote:<br>
<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"><div><div class="h5">
<br></div></div><div class="im">
1. Optional parentheses for normal functions should work shallowly IMO.<br>
2. Optional parentheses for property functions should not work. Applying ()<br>
for property function name always applied to its returned value.<br>
<br>
#1 is a ratification of current behavior. It allows the combination of UFCS<br>
and removing redundant ()s.<br>
#2 is a breaking change. If we need it, community consent is required.<br>
<br>
Kenji Hara<br>
</div></blockquote>
<br>
I can completely agree with this change. It is perfectly workable to fix properties without changing optional parens. I just won't use them :-P</blockquote><div><br></div><div>I have thought an additional idea.</div>
<div>If we really want a feature to disable optional parentheses for normal functions, we can add @function attribute to the language spec.</div><div><br></div><div>int foo();</div><div>@property int bar();</div><div>@function int baz();  // new!</div>
<div><br></div><div>int x1 = foo();  // ok</div><div>int x2 = foo;  // optional parentheses, allowed</div><div>int y1 = bar();  // disallowed, calling int is meaningless<br></div><div>int y2 = bar;  // ok</div><div>int z1 = baz();  // ok</div>
<div>int z2 = baz;  // *disallowed* by @function attribute</div><div><br></div><div>How about?</div><div><br></div><div>Kenji Hara</div></div></div></div>