DIP81: Writing files at compile time

JDemler via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 13 00:57:16 PDT 2015


On Thursday, 13 August 2015 at 04:58:06 UTC, Rikki Cattermole 
wrote:
> [...]

So in the vibe.d example we would generate a file diet.di which 
would include all the generated diet templates of the whole 
project? Maybe 100 * 50 extra lines of code for a medium sized 
project?
This is not debuggable, understandable or transparent.
Especially because the generated code lies inside a file of a 
library which I should not need to know about.

Also I do not understand how we could expand template 
instatiations. Maybe it would be possible for basic templates 
that only take types but imagine a template that takes a parse 
tree as a value. How would an expanded version of that look like?



More information about the Digitalmars-d mailing list