Table lookups - this is pretty definitive

Walter Bright newshound2 at digitalmars.com
Wed Apr 2 18:05:32 PDT 2014


On 4/2/2014 3:06 PM, bearophile wrote:
> Walter Bright:
>
>> I don't see why not. Note that we couldn't do this for extern(C) functions, or
>> variadics, or caller functions with parameters that need destruction, or
>> parameters that may refer to any locals. That last constraint might be a
>> doozy, however.
>>
>> Why not submit an enhancement request to bugzilla?
>
> So what does it happen if I (by mistake or by ignorance) try to use this on a
> function that doesn't satisfy one of those requirements?

Then it won't tail call it.

> D can't give an error in that case because it's a big breaking change. So is D in that case just
> silently not performing the tail call as the programmer meant?

That's right.



More information about the Digitalmars-d mailing list