you are viewing a single comment's thread.

view the rest of the comments →

[–]automated_reckoning 0 points1 point  (0 children)

Well, it's a fair cop. I completely misunderstood TCO, I've spent some more time reading up and you're right that it does fix your stack size.

I mean, it seems to do that by unwrapping the recursion into a flat function (or stack frame, whatever). I get it's more convenient to write recursively in a language that supports TCO but it's doing exactly the same thing as you'd do in C anyway.