Hacker News new | past | comments | ask | show | jobs | submit login

  The --full-tail-calls flag is not on by default, partly
  because it is noticably slower (though I have not measured
  how much), and partly I think it is more useful for Kawa to
  be compilatible with standard Java calling conventions and
  tools.
Well, for some definition of just fine. Well implemented TCO is a performance boost, not hit on most platforms. The lack of TCO built into the JVM means that JVM languages like Scala and Kawa generally have to roll their own on top of the JVM, resulting in a performance hit.



Performance is irrelevant I think to the discussion. The claim is being made that Clojure and ABCL don't do full tail call elimination because of stack restrictions in the JVM. That sounded unlikely to me. Kawa does full tail call elimination and it's a JVM language. Hence, this claim can't be true, right?


Kawa fakes it. The JVM doesn't support it so if you use a normal function call you don't get tail recursion.

You could avoid calling functions and instead do your own stuff but that doesn't change the fact that the JVM doesn't support it.

That is what they mean by performance, you lose performance because you can't do naked function calls in those cases.

Since except mutual recursion (which is difficult to detect tail recursion for correctly) the benefit of tail recursion is a performance boost it is ignored when the cost of implementing it kills your performance.


Well, if you ignore performance, all Turing-complete languages are identical, right?


If it's a performance hit, that's not much of an 'optimization'.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: