Why CTFE is context-sensitive?
Pierre Talbot
ptalbot**mustberemoved** at hyc.**thisto**io
Mon Jan 27 10:30:42 PST 2014
On Monday, 27 January 2014 at 04:07:04 UTC, Andrei Alexandrescu
wrote:
> On 1/26/14 3:22 AM, Pierre Talbot wrote:
>> Hi,
>>
>> I was wondering why CTFE is context sensitive, why don't we
>> check
>> every expressions and run the CTFE if it applies?
>
> Compilation would get awfully slow (and sometimes won't
> terminate).
>
> Andrei
So it is theoretically possible? I mean if the compilation
doesn't terminate, the execution won't either for at least one
program input, so we can detect an infinite loop at compile-time.
Moreover, isn't the same problem with context-sensitive CTFE?
Pierre
More information about the Digitalmars-d
mailing list