Few ideas to reduce template bloat
Norbert Nemec
Norbert at Nemec-online.de
Fri Mar 26 06:01:04 PDT 2010
bearophile wrote:
> Norbert Nemec:
>> D is clearly designed as language that can be compiled to a static binary.<
>
> Just to be sure you have understood: the solution number 5 is for a statically compiled language. It doesn't need a JIT. You just need normal objects, a virtual table, etc.
Of course. In that sense, Java, C#, C++ and D are all in the same boat.
My comment was geared towards languages that experiment with multi-stage
compilation (or "specialization").
What I wanted to say: statically compiled languages typically
distinguish between generics (which "exist" at run time as objects) and
templates (which exist at compile time only). Most languages offer only
one of both.
Once you start merging both concepts you quickly end up with smearing
the boundary between run-time and compile-time and depend on JIT
technology or multi-stage compilation.
D may of course use these techniques for optimization, but the language
should not depend on them.
More information about the Digitalmars-d
mailing list