How useful are compile time functions? Personally I haven't worked in any language that supports them but they seem nifty in some cases.
For those who don't what I mean, a compile-time function is evaluated at compilation rather than at runtime,
so if you have for instance in your code
int i = Pow(4,34);
you could instead do something like this
int i = Pow<compilation>(4,34);
and the actual runtime code would be
int i = 295147905179352825856;
Naturally there are some restrictions on what functions could be run at compile time, they pretty much have to be pure/static but I can also see some instances where it could be used to fetch data into something from a file or database (even though in most cases those things shouldn't be compiled into the code)
What do you think, is a feature like that actually useful or just "cool"? :)