Is metaprogramming useful?
Charles D Hixson
charleshixsn at earthlink.net
Mon Nov 27 20:51:17 PST 2006
Steve Horne wrote:
> On Mon, 27 Nov 2006 14:28:15 +0100, "Frank Benoit (keinfarbton)"
> <benoit at tionex.removethispart.de> wrote:
>
>> Well, D might be faster, but it shows that the compile time can increase
>> very fast.
>
> When doing the metaprogramming, the compiler is basically acting as an
> interpreter as opposed to a compiler. It is nothing more advanced or
> freaky than that.
>
Interesting...particularly as what I really want is basically
the opposite. I expect PyD to just exactly fill my needs in a
few more months. Currently I'm working in Python, and my only
option has been Pyrex (not a bad choice in itself!), but PyD
should be a much better choice, as D is a better underlying
match to Python than C is, and what I'll be doing is largely
translating chunks of Python into a compilable language for speed.
Of course, what would be really interesting would be a runtime
version of D, with runtime type assignment, etc., but without
the kind of bloat that would occur if this were done with
templates.
(OTOH, I must admit that I'm guessing at the amount of bloat
that a generic template would add. They don't add that much
in Eiffel or Ada code, but they were impossibly bloated the
last time I tried it in C++ [admittedly that's over a decade
ago].)
More information about the Digitalmars-d
mailing list