<div dir="ltr">On Wed, Sep 3, 2008 at 4:30 PM, 0ffh <span dir="ltr"><frank@youknow.what.todo.internetz></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">bobef wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
opCalls are much more flexible than ctor's because their return type may<br>
vary or they may not have return type. I vote against deprecating them. Let<br>
whoever likes ctors use them and whoever likes opCalls use these.<br>
</blockquote>
<br></div>
I agree opCalls are more flexible, but unfortunately you can't have both<br>
because of syntactical ambiguity... :-(<br>
<br>
regards, 0ffh<br>
</blockquote></div><br>Speaking of syntactical ambiguity, the expression<br><br>S(1, 2, 3)<br><br>can, right now, have one of three meanings:<br><br>1. A struct literal for struct S<br>2. A call to S's static opCall<br>
3. An instantiation of S and a call to its ctor<br><br>Even if opCall goes away, we'll still be left with the ambiguity of struct literal vs. ctor. I'd really, really like to hear Walter's view on this but he has responded neither to the thread I posted on digitalmars.D nor the bugzilla ticket (<a href="http://d.puremagic.com/issues/show_bug.cgi?id=2170">http://d.puremagic.com/issues/show_bug.cgi?id=2170</a>). <br>
</div>