On Sun, Mar 21, 2010 at 23:02, BCS
<none@anon.com> wrote:
My unitted type uses it for it's value<->unit properties to get a single point of definition for each unit:
http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d
Ah, I see, that's nice. You use the received string to feed another template and generate what you need. Good idea.
Why did you make OfType opDispatch a static function?
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.
using(myDatabase.tables.baz.bar) foreach(Row!(int) row; select!("baz.foo").whare(for.a != someInt && baz.c == bar.c))
do(row.foo);
If you have a limited number of methods like .whare, why use opDispach? (Sorry if my question is naive).
Philippe