program for building the program
Nick Sabalausky
a at a.a
Tue Dec 1 06:02:40 PST 2009
"Gzp" <galap at freemail.hu> wrote in message
news:hf2k9a$2l54$1 at digitalmars.com...
>
> So to designing template(generic) code, a simplified language should be
> created that generates the actual source. So the border b/n the two
> language can be made more explicit and fewer questions arose.
>
The problem with that, aside from the increase in the grammar's complexity,
is that anytime you want to be able to do something at both runtime and
compile-time, you'd have to write two separate implementations of the same
thing, which carries with it all the problems assisiated with breaking DRY.
Plus then that would create a need to write meta-meta-functions that
generate both the runtime and compile-time versions of the same function.
CTFE (and better yet, Nemerle's way, at least from what I've seen of it), is
just a better approach.
> The compiler also should provide readably output of the generated code.
I'm not sure if this is what you mean, but I definitely want a compiler
switch that outputs the resulting D code after all the mixins and such are
applied.
More information about the Digitalmars-d
mailing list