"Gzp" <ga...@freemail.hu> wrote in message news:hf2k9a$2l5...@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.