Compile time function execution...
BCS
BCS at pathlink.com
Fri Feb 16 11:37:28 PST 2007
Dave wrote:
> 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.
On the line, how about a timeout flag for unattended builds? As it is
DMD can now fail to error on bad code by just running forever. With
template code it would seg-v sooner or later.
More information about the Digitalmars-d
mailing list