<div dir="ltr">On Sat, Dec 5, 2015 at 2:55 PM, T.J. Usiyan <span dir="ltr">&lt;<a href="mailto:griotspeak@gmail.com" target="_blank">griotspeak@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><br></div><div>Tail call optimization can be a powerful tool when implementing certain types of algorithms. Unfortunately, ARC&#39;s semantics interfere with our ability to handle all possible cases of tail call recursion. An attribute, similar to Scala&#39;s `tailrec`, along with LLVM warnings, could allow a clear indicator of when such optimizations are not guaranteed to work.</div></div></div></blockquote><div><br></div><div><div>I have primarily worked in functional languages with guaranteed tail call elimination for many years. Turning to Swift, I (grudgingly) try to avoid recursion altogether simply because of the risk of blowing the stack.</div></div><div><br></div></div></div></div>