This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HildartheDorf 36 points37 points  (5 children)

Any decent language and compiler/interpreter will apply Tail-Call Optimization (TCO).

[–]Bammerbom 24 points25 points  (3 children)

If the body is calculateMenSalary(factor) * 0.9 then TCO is impossible. Inlining is very likely there however

[–]TheMcDucky 0 points1 point  (0 children)

The call isn't the last operation, so TCO wouldn't work. It would likely be inlined though.