Why CTFE is context-sensitive?

Pierre Talbot ptalbot**mustberemoved** at hyc.**thisto**io
Sun Jan 26 12:06:17 PST 2014


On Sunday, 26 January 2014 at 15:06:30 UTC, Pierre Talbot wrote:
> On Sunday, 26 January 2014 at 13:48:47 UTC, Timon Gehr wrote:
>> On 01/26/2014 10:59 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?

I start to think that it was mostly for a matter of convenience,
if we use CTFE everywhere, we need a way to desactivate it (for
example for code depending on endianness or specific floating
arithmetic model). I read somewhere that it was really nice to
not introduce new keywords (maybe needed if we want to explicitly
deactivate this optimization).

Through it's just pure speculation and I'd be glad to have the
real reason.


More information about the Digitalmars-d-learn mailing list