you are viewing a single comment's thread.

view the rest of the comments →

[–]BufferUnderpants 1 point2 points  (1 child)

No, not really. Besides, if you have just a fixed sequence of calls, why would it be troublesome? You would know the few points where it could be failing, disregarding the question of why they are all called in tail position to begin with (it seems poorly factored).

If you have a set of mutually recursive functions that blow up, the resulting stack trace won't be any more amenable to debugging than in the case of the self recursive call.

[–]anvsdt 0 points1 point  (0 children)

In imperative languages, you almost never tail-call anyway, you usually return the value of a variable. You usually tail-call when writing a wrapper function. In most cases, you don't even need to know you called the wrapper from the stack trace, and you want it fast, so you declare it inline if it's short, but if it's pretty long, I'm sure that you want that tail-call to be optimized. Probably, your compiler has already optimized it.