

Romans, rubies and the D language's Compile Time Function Execution - mapleoin
http://idorobots.org/2012/03/04/romans-rubies-and-the-d/

======
skrebbel
I've absolutely no D experience, but maybe others do:

I wonder, if a nice and friendly library uses features like this to provide a
fancy embedded DSL, would compile-times suffer? If so, by how much?

Say, you could make something like LINQ entirely from inside a library using
methods like these. Strongly typed ORM-ish methods that depend on the data
model in use, even, maybe? Would that be too slow?

~~~
eco
The more you do at compile time the longer compilation will take, of course.
It's hard to say how much something like that would affect compile time
without actually doing it. The official compiler, dmd, is already incredibly
fast though (the 182,955 line standard library phobos built in 9.254 seconds
on my machine) so you have a lot of headroom to work with.

------
peteretep
I could really resist a Perl version, sorry

<https://gist.github.com/2023260>

