Compile time function execution...

Dave Dave_member at pathlink.com
Fri Feb 16 11:25:00 PST 2007


Bill Baxter wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Walter Bright wrote:
> 
>> That could be achieved with a watchdog process without changing the 
>> compiler, and it's more flexible.
>>
>> I think you just let the compiler go and crunch at it. Since you 
>> esentially have partial evaluation anyway, the execution process can 
>> be seen as extended to compile time. If you have a non-terminating 
>> program, that non-termination can be naturally manifest itself during 
>> compilation=partial evaluation.
> 
> It would be nice though, if the compiler could trap sigint or something 
> and spit out an error message about which part of the code it was trying 
> to compile when you killed it.
> 
> Otherwise debugging accidental infinite loops in compile time code 
> becomes...interesting.
> 
> --bb

How about listing any CTFE with -v? That should be more reliable and useful in other ways too.



More information about the Digitalmars-d mailing list