example for compile time function execution

BCS ao at pathlink.com
Fri Apr 27 17:17:09 PDT 2007


Reply to Walter,

> 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?
> 

this is a union of a few things

1] my crazy idea to do a compieler in D CTFE
2] Jeff Nowakowski's post in the main D ng about the Unreal Engine

How about a compile time "script to byte code" package? Some sort of VM that 
is totally integrated into your app could use byte code programs that are 
compiled by your engine at compile time.





More information about the Digitalmars-d mailing list