Segment violation (was Re: Why I could not cast string to int?)

bearophile bearophileHUGS at lycos.com
Thu Feb 2 15:17:36 PST 2012


Timon Gehr:

> This is not a tail-recursive function. And neither is recFactorial, my 
> bad. Anyway, my point was that the compiler should not generate code 
> that blows up on a (in principle) perfectly sane implementation.

Is it possible to create a function attribute like @tail_recursive that produces a compile error if you apply it to a function that's not tail-recursive?

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list