# Any good resource to understand the issues with recursion in Julia?

**URL:** https://discourse.julialang.org/t/any-good-resource-to-understand-the-issues-with-recursion-in-julia/104615
**Category:** New to Julia
**Tags:** recursion
**Created:** [October 5, 2023, 2:43pm UTC](https://discourse.julialang.org/t/any-good-resource-to-understand-the-issues-with-recursion-in-julia/104615 "2023-10-05T14:43:37Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [October 5, 2023, 3:00pm UTC](https://discourse.julialang.org/t/any-good-resource-to-understand-the-issues-with-recursion-in-julia/104615/4 "2023-10-05T15:00:25Z")

</div>

> [@bguillen](#):
>
> I keep reading that Julia is not great with recursion and that TCO is not well supported, and that I should make the calls iterative instead of recursive

This is nonsense. Recursion is perfectly fine in Julia. See [Recursion in Julia — bad idea? - #5 by stevengj](https://discourse.julialang.org/t/recursion-in-julia-bad-idea/99304/5)

Julia doesn’t do TCO, but any algorithm where TCO is applicable is uninteresting for recursion in an imperative language — tail-call recursion is trivially written as a loop. Interesting applications of recursion tend to _not_ be tail calls — for example, quicksort is not tail-recursive.

TCO has been discussed _ad nauseam_. See

- [Yet another TCO thread - #3 by Palli](https://discourse.julialang.org/t/yet-another-tco-thread/81146/3)
- [Does Julia have tail call optimization?](https://discourse.julialang.org/t/does-julia-have-tail-call-optimization/64101)
- [tail call elimination · Issue #4964 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/4964)

---

_[View the full topic](https://discourse.julialang.org/t/any-good-resource-to-understand-the-issues-with-recursion-in-julia/104615)._
