Hacker News new | ask | show | jobs
by ZiiS 178 days ago
At least in Lua then the rule is simply 'last thing a function dose' this is unambiguous. `return f()` is always a tail call and `return f() + 1` never is.
1 comments

What about:

return 1 + f()

?

No, the last thing is the +; which can't run till it knows both values. (Reverse Polish notation is clearer, but humans prefer infix operators for some reason)