At compile time

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Fri Aug 21 04:21:58 PDT 2009


Don wrote:
> Lars T. Kyllingstad wrote:
>> Don wrote:
>>> Jarrett Billingsley wrote:
>>>> I don't think you can call struct methods at compile-time.  Kind of
>>>> lame, I know.  Try making norm a free function.
>>>>
>>>>> Can the D2 compiler modified/improved to allow this?
>>>>
>>>> It sure would be nice.
>>>
>>> In fact the D1 compiler should support it too.
>>> BTW a few of the restrictions on CTFE will be removed in the next 
>>> release.
>>
>>
>> This is good news! The restrictions you are referring to, are they any 
>> of the ones documented here:
>>
>>     http://www.digitalmars.com/d/2.0/function.html#interpretation
>>
>> or are they "undocumented" restrictions, i.e. bugs?
>>
>> -Lars
> 
> Both. Using CTFE will be a completely different experience after the 
> next release.


I can't wait. :)

-Lars


More information about the Digitalmars-d-learn mailing list