<div dir="ltr">2013/2/5 Andrej Mitrovic <span dir="ltr"><<a href="mailto:andrej.mitrovich@gmail.com" target="_blank">andrej.mitrovich@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On 2/4/13, kenji hara <<a href="mailto:k.hara.pg@gmail.com">k.hara.pg@gmail.com</a>> wrote:<br>
> This is not correct."m.s & m.s" is always parsed as binary bitwise AND expression.<br>
> So there is no address expression.<br>
<br>
</div>Fantastic, more special casing. I don't think you guys realize what a<br>
mess you would introduce. Basically:<br>
<br>
s & s; // fine, they're binary operators<br>
&s; // oops, doesn't work even if property returns a type with a unary operator</blockquote><div><br></div><div>Address operator cannot be overloaded.</div><div><a href="http://dlang.org/operatoroverloading">http://dlang.org/operatoroverloading</a><br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
On 2/4/13, kenji hara <<a href="mailto:k.hara.pg@gmail.com">k.hara.pg@gmail.com</a>> wrote:<br>
> Address expression is _only_one_ built-in feature to make a callable object<br>
> from function symbol. So<br>
> this "special feature" is enough reasonable to me.<br>
<br>
</div>Yes "only one". And then later we'll add another "one", and another<br>
one, until we end up with the mess that is C++. This feature does not<br>
pull its own weight regardless of how easy it is to implement in the<br>
compiler. From a user's perspective, it is completely pointless and<br>
unintuitive.<br>
</blockquote></div><br></div><div class="gmail_extra" style>We can think like this.</div><div class="gmail_extra" style>"To resolve ambiguity, we should introduce new operator: &( exp )".</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Or, we can think like that we introduce one new restriction.</div><div class="gmail_extra">"If you want to get function address, you MUST not add redundant parenthesis."</div><div class="gmail_extra" style>
&func; // OK<br></div><div class="gmail_extra" style>&(func); // Bad.</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>It should be written in the article "Migration for Property Enforcement".</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra">Kenji Hara<br></div></div>