<br><br><div class="gmail_quote">On Wed, Mar 31, 2010 at 21:21, Adam D. Ruppe <span dir="ltr">&lt;<a href="mailto:destructionator@gmail.com">destructionator@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, Mar 31, 2010 at 09:03:10PM +0200, Philippe Sigaud wrote:<br>
&gt; Cool, I wasn&#39;t sure it&#39;d work. Now we know what this new trait is for :)<br>
<br>
</div>It is slightly different than my old code: the getPlainName helper function<br>
is not required with the __trait. (It truncated the string at the first<br>
paren, since stringof returns the arguments too, whereas identifier does<br>
not).<br></blockquote><div><br>I get it.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I think it would be a good idea to get a nice overview doc written up on<br>
template idioms - things like this, how to use the isSomeString, etc,<br>
templates in std.traits to work the constraints, and so on.<br></blockquote><div> <br>Or the way to sneak arrays as template parameters...<br>
<br>Oh yes. I&#39;d be willing to participate, but I&#39;m also waiting to see what 
Andrei says in his book.<br>
<br></div><div>I recently made a template to bind template parameters, and another to determine the &#39;arity&#39; of a template (no param, 1, etc.). The latter was after discovering that if an alias parameter is a template, the .stringof gives the entire signature : parameters, constraints, etc.<br>
I&#39;m discovering something new every week and I have the impression my knowledge of templates is ... kaleidoscopic : lots of colorful parts, no global vision.<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Another one in pretty.d I hit was taking a ParameterTypeTuple and using it<br>
to expand the runtime args array. At first, I used a list of static if<br>
T.length == 1, and manually written it out. Today, I changed it to a CTFE<br>
function returning a string to mix on, which sucks less, but still feels<br>
weird.<br></blockquote><div><br>I still feel wrong when I&#39;m using CTFE. That&#39;s too bad, because with the recent leaps in the CTFE perimeter Don made, CTFE has become a very powerful tool indeed. <br> <br><br></div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Having a nice overview document would be good to save time and make this<br>
kind of code prettier. Maybe I&#39;ll write one to get started then post it to<br>
the group for additions and improvements. Don&#39;t have the time today though.<br></blockquote><div><br>A document, or a wiki page. But to start things and get a little attention, a discussion here is better.<br><br><br>
  Philippe<br> <br></div></div>