Does Julia have tail call optimization?

does Julia have tail call optimization ?
or does a recursive function always overflow regardless of if you are careful to construct it in that fashion ?

No. It’s a very low priority since any tail-call algorithm is simpler to write as a loop. https://github.com/JuliaLang/julia/issues/4964

5 Likes

Let’s not have (yet another) TCO conversation on a thread asking a beginner question about recursion.

5 Likes

my bad, should have searched the forum first…
it was intended as a yes/no question not something to start a discussion.

2 Likes

No problem. From experience I know this topic tends to lead to long discussions.

7 Likes