CTFE determination?

Russell Lewis webmaster at villagersonline.com
Mon Sep 15 07:47:15 PDT 2008


bmeck wrote:
> That might be the case that you have to specify programmaticly right now but I still think it would be useful if there was a way to determine this since somethings could be automated, making it easier for programmers and on large calculations this could speed things up significantly if being used with mixins to optimize structures.

You'll get no argument from me there.  I'm a big fan of static analysis, 
although IMHO it would make more sense in a separate tool, rather than 
the compiler.

Also, in any static analysis, you have to answer the (difficult) 
question of: "Is this analysis worth the cost?  Would it be faster to 
just compile and run it?"  That's always a hard one, and as a general 
rule, it's unanswerable...by the time that you are certain which path 
would be faster, you have already paid the cost of analysis. :(

It's a thing worth considering, though.



More information about the Digitalmars-d mailing list