More bugs...

SomeDude lovelydear at mailmetrash.com
Sun Apr 29 01:55:17 PDT 2012


On Sunday, 29 April 2012 at 06:22:34 UTC, James Miller wrote:
>> D templates are analysed eagerly upon instantiation, whereas 
>> C++ templates are analysed lazily. This is not a bug, it is a 
>> feature.
>
> Furthermore, eager analysis is necessary for other D features 
> like CTFE and compile-time reflection.

Ah, I was  wondering about that. Thank you for confirming.
I will gladly ditch lazy template eval for something like CTFE.

> Honestly, in C++ I would stay away from code like the above 
> anyway, irrelevant of whether it compiles, seems too "magic-y" 
> for my tastes. I don't like things not being explicit.
>

+1



More information about the Digitalmars-d mailing list