toHash => pure, nothrow, const, @safe
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Mar 13 17:02:24 PDT 2012
On 3/13/12 5:39 PM, kennytm wrote:
> Andrei Alexandrescu<SeeWebsiteForEmail at erdani.org> wrote:
>> Because in the general case functions call one another so there's no way
>> to figure which to look at first.
>>
>> Andrei
>
> That's no difference from template functions calling each others right?
>
> int a()(int x) { return x==0?1:b(x-1); }
> int b()(int x) { return x==0?1:a(x-1); }
There is. Templates are guaranteed to have the body available. Walter
uses a recursive on-demand approach instead of a worklist approach for
inferring attributes (worklists have an issue I forgot about).
Andrei
More information about the Digitalmars-d
mailing list