2 ms·
> On mutually recursive tail calls, yes, the runtime doesn't have support. Because it misses support for TCO, you're ready to call the JVM "godawful"? Some JVM
by anonymoushn 13y ago
> On mutually recursive tail calls, yes, the runtime doesn't have support. Because it misses support for TCO, you're ready to call the JVM "godawful"?
Some JVMs such as Avian support this feature, so they may not be godawful. I haven't used them much, so I don't know.
> For the JVM, a prototype for optimized tail recursive calls is in the works and given the attention that invokeDynamic received lately, I have no doubt it will be implemented for JDK 9 [2], especially given that people like Guy Steele are calling for it [3].
This is great to hear, thanks for telling me about it :)
It sounds like I will have a better time in JVM-land next time, if I ever have a reason to go back.
> TCO is considered an optimization, not a guarantee, so if you want it to do a TCO by contract, then an annotation makes sense, no?
In JVM-land, this is the case, which is why I said one should be careful to use the annotation. I don't have a problem with using the annotation. I do have a problem with TCO not being guaranteed in the language spec (like Lua), or at least supported by popular runtime+compiler combinations (like C++).