Compile time function execution...

Walter Bright newshound at digitalmars.com
Thu Feb 15 16:06:59 PST 2007


Michiel wrote:
> Walter Bright wrote:
> 
>>>> Many functions could be executed at compile time, but should not be.
>>> When should they not be?
>> 1) Another poster mentioned a function that decompressed a built-in
>> string - the whole point of having it compressed was to reduce the exe
>> file size. Decompressing it at compile time defeats the purpose.
> 
> Yes, that one was mentioned by Bill Baxter. But I think this is the
> exception rather than the rule. The programmer could explicitly tell the
> compiler to not execute that piece of code at runtime.

The programmer *already* has explicit control over whether it is folded 
or not.



More information about the Digitalmars-d mailing list