<div class="gmail_quote">On Sun, Mar 21, 2010 at 23:02, BCS <span dir="ltr"><<a href="mailto:none@anon.com">none@anon.com</a>></span> wrote:<br><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
My unitted type uses it for it's value<->unit properties to get a single point of definition for each unit:<br>
<a href="http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d" target="_blank">http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d</a><br>
<br></blockquote><div><br>Ah, I see, that's nice. You use the received string to feed another template and generate what you need. Good idea.<br>Why did you make OfType opDispatch a static function?<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;">
I've also been thinking of a way to build a compile time LINQ like program. If the comparison and boolean operators are overloadable, you could build prepared SQL queries from expressions at compile time.<br>
<br>
using(myDatabase.tables.baz.bar) foreach(Row!(int) row; select!("baz.foo").whare(for.a != someInt && baz.c == bar.c))<br>
do(row.foo);<br></blockquote><div><br>If you have a limited number of methods like .whare, why use opDispach? (Sorry if my question is naive).<br><br><br> Philippe <br></div></div><br>