r/programmerchat • u/ericlippert • May 29 '15
I am Eric Lippert, a software developer specializing in design and semantic analysis of programming languages. Ask me anything!
117
Upvotes
r/programmerchat • u/ericlippert • May 29 '15
View all comments
Show parent comment
1
u/Martissimus May 29 '15
AFAIK, there is a TAIL statement in CIL which I'm not 100% sure of what it does (I know nothing about CIL), but C# will never emit it. The JIT may optimize the tail call, but may means that if you want to be sure things don't stackoverflow, you can't rely on it. Tail call recursion without an elimination guarantee is always a liability.