DIP: Tail call optimization

ketmar via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Jul 9 23:17:08 PDT 2016


On Sunday, 10 July 2016 at 05:55:50 UTC, Dietrich Daroch wrote:
> Yes, it probably does TCO. The problem is what if you think it 
> does and it cannot do it because of a misunderstanding on when 
> it can be applied or a bug?

there can't be any "misunderstanding" from compiler side. either 
it is a leaf return, or not -- it is as easy as that. what your 
DIP is aimed for is brain-damaged coders who are not able to 
understand how programs work (and why "scope(exit)" may prevent 
TCO). it won't help anyone. sorry.


More information about the Digitalmars-d-announce mailing list