# Tail-call recursion

**URL:** <https://discourse.julialang.org/t/tail-call-recursion/87847>\
**Category:** Performance\
**Created:** [September 26, 2022, 10:09pm UTC](https://discourse.julialang.org/t/tail-call-recursion/87847 "2022-09-26T22:09:53Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 30, 2022, 11:40am UTC](https://discourse.julialang.org/t/tail-call-recursion/87847/19 "2022-09-30T11:40:10Z")

</div>

> [@cdawg](#):
>
> I think on one thread it’s a pretty straightforward problem

Do you have an example of any language or compiler that performs the optimization you want? That would be more constructive.

(Or do you just want memoization? This is of course easy [with a macro](https://github.com/JuliaCollections/Memoize.jl), but is not the sort of thing a compiler should do without the programmer explicitly requesting it.)

> [@cdawg](#):
>
> I can’t argue about terminology

It’s not just a question of terminology. It’s a question of real vs. imaginary.

You have to understand that it’s pretty frustrating for us to get repeated threads where people are like “Julia doesn’t have TCO, it needs TCO to have fast recursion, why does it suck compared to functional languages, why don’t you want recursion to be fast”, and then it turns out inevitably that they have no idea what TCO is or why it is/isn’t useful, and the optimized recursion they are imagining is instead some entirely different and possibly fictional concept.

---

_[View the full topic](https://discourse.julialang.org/t/tail-call-recursion/87847)._
