<div dir="ltr"><br><div class="gmail_quote">On Wed, Sep 3, 2008 at 7:29 PM, Walter Bright <span dir="ltr"><<a href="mailto:newshound1@digitalmars.com">newshound1@digitalmars.com</a>></span> wrote:<br><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">Jarrett Billingsley wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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" target="_blank">http://d.puremagic.com/issues/show_bug.cgi?id=2170</a>).<br>
</blockquote>
<br></div>
If there's any constructor defined for S, then S(args) is a constructor call.<br>
<br>
If there's any opCall defined for S, then S(args) is an opCall call.<br>
<br>
Otherwise, it's a struct literal.<br>
</blockquote></div><br>So uh,<br><br>why don't you want to change struct literals?<br><br></div>