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. tail call elimination · Issue #4964 · JuliaLang/julia · GitHub

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.

1 Like

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

6 Likes