compile-time variables?

BCS ao at pathlink.com
Mon May 28 10:44:40 PDT 2007


Reply to David,

> Bruno Medeiros wrote:
> 
>> [...]
>> I find it interesting, and even kinda of
>> funny and ironic, that D meta-programming is a *completly* pure
>> functional programming world :P . Funny and ironic because the first
>> thing that poped to mind when I first "entered" D meta-programming,
>> was the Scheme pure functional programs we (me and my fellow 
>> colleagues) did some years ago in my college's first-year, SICP-based
>> college course.
>> :)

same here, meta stuff really clicked after doing some scheme

> It's true that D shares C++'s pure metaprogramming facilities, but I
> think it is fairly easy to see why.  Both of these languages already
> know how to do constant folding and template instantiation, which
> don't require any heap management.  Since dynamic languages like Lisp
> generally have a runtime evaluation engine, running that in the
> compile phase is no big deal, whereas it's a lot less trivial to do
> that in D (though Walter allows dynamic strings as the exception to
> the compile-time heap rule).
> 

why is it just char[], why not T[] for any T that can be used by it's self? 
I have some cases where I want to do that.





More information about the Digitalmars-d mailing list