<div dir="ltr"><div class="gmail_extra">On Sun, Nov 10, 2013 at 3:37 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br>
<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=""><div class="h5">On 11/10/13 3:21 PM, Timon Gehr wrote:<br>

<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">
On 11/10/2013 11:43 PM, Andrei Alexandrescu wrote:<br>
<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"><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">

<br>
It seems we could even get rid of __FILE__,__LINE__,__MODULE__ with AST<br>
macros.<br>
</blockquote>
<br>
This would be a very small advantage. The special variables hardly cause<br>
any trouble.<br>
<br>
Andrei<br>
</blockquote>
<br>
The trouble is that there are too few of them to (efficiently) reflect<br>
all the information about the calling context one may be interested in.<br>
I don't see the point in adding them one after another in an<br>
unprincipled ad-hoc fashion instead of actually thinking up a good API<br>
coupled with some more expressive power.<br>
</blockquote>
<br></div></div>
But the API would add them in exactly the same rote manner. I really don't see an advantage here.</blockquote><div><br></div><div>All else being equal, a library solution is always preferable; and it's easily extensible unlike what we have. <br>
</div><div> </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"> An argument for macros would have to do a lot more than "we don't need __FILE__ etc. anymore".</blockquote>
<div><br></div><div>More use cases have already been provided in this thread and previously. The fact that *one* language feature enables all of those is a very good indication there'll be more use cases. Furthermore, writing AST macros instead of mixins is cleaner in terms of introspection, refactoring tools, etc.</div>
<div><br></div><div> </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"><span class=""><font color="#888888"><br>

<br>
Andrei<br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra"><br></div><div><br></div></div>