example for compile time function execution

Dan murpsoft at hotmail.com
Fri Apr 27 16:11:01 PDT 2007


Walter Bright Wrote:

> I keep racking my brain trying to come up with a short, pithy example of 
> CTFE that uses AAs or struct literals. It should be just a few lines, 
> and make it clear why CTFE is a great thing. I want to use it in 
> presentations.
> 
> Any ideas?

You could technically write a D compile-time-executed ECMAScript engine using CTFE and associative arrays...

but I don't know off the top.



More information about the Digitalmars-d mailing list