mixins make the code more ugly and the error messages' line numbers will not be in sync with the code, IIRC.<div>I would like this syntax sugar too.</div><div><br></div><div>It's also used in GO, btw.<br><br><div class="gmail_quote">
On Wed, May 29, 2013 at 7:52 PM, Diggory <span dir="ltr"><<a href="mailto:diggsey@googlemail.com" target="_blank">diggsey@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Thursday, 30 May 2013 at 02:51:47 UTC, Diggory wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thursday, 30 May 2013 at 01:35:58 UTC, MrzlganeE wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Diggory:  That's very cool -- being able to do that in D. Thanks for showing me :)<br>
<br>
But it is not even a remotely practical solution.<br>
   The idea is to write less, and so the solution you've given is to write more mixins all over the place. I said I don't even want to write 'auto', I am surely not writing the big mixin chunk.<br>
<br>
I only gave an example of math stuff.<br>
But I'd use := for the non-math stuff too.<br>
<br>
I want := it to be available everywhere.<br>
Even if I am just typing a snippet into dpaste.<br>
<br>
If D implements this, C++ will try to copy it 10 years later.<br>
It's a futuristic thing -- what is old is new.<br>
</blockquote>
<br>
The mixin definition only needs to exist once, and you can use "mixin" anywhere - you could wrap an entire source file in it:<br>
<br>
mixin!q{<br>
<br>
/* All of your code */<br>
<br>
}<br>
</blockquote>
<br></div></div>
*mixin Math!q{ ... };<br>
</blockquote></div><br></div>