<br><br><div class="gmail_quote">On Sat, Jun 22, 2013 at 2:55 PM, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 06/22/2013 11:51 PM, Timothee Cour wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Sat, Jun 22, 2013 at 2:47 PM, Timon Gehr <<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a><br></div><div><div class="h5">
<mailto:<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>>> wrote:<br>
<br>
On 06/22/2013 09:52 PM, Timothee Cour wrote:<br>
<br>
Is there a reason the language spec disallows this?<br>
<br>
----<br>
void main(){<br>
auto a=mixin("1");//OK<br>
alias b=a;//OK<br>
mixin("alias c=a;");//OK<br>
// alias c=mixin("a");//NG : Error: basic type expected,<br>
not mixin<br>
}<br>
----<br>
<br>
<br>
No, it is arbitrary.<br>
<br>
<br></div></div><div class="im">
that's what i thought!<br>
same with template mixin's being restricated.<br>
<br>
</div></blockquote><div class="im">
<br>
?<br>
<br></div></blockquote><div><br></div><div>they're restricted to declarations. I don't see the need for such restriction.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
... can we fix it?<br>
<br>
it makes for cleaner code.<br>
<br>
</blockquote>
<br></div>
It surely could be fixed if you want to spend the time hacking on DMD.<br>
I think the grammar is somewhat poorly designed in general.<br>
</blockquote></div><br>