| > I think tail call conversion to iteration You cannot convert a tail call to an iteration in a generic case. Consider the following: `let f g x = g x` Here, call `g x` is a tail call, and you've no idea what `g` is, so you cannot statically inline it or convert to a loop. > JITs are free to inline beyond that as much as they want JITs are primitive and do not have much time to do anything interesting. Inlining is very important alongside with partial evaluation - which is very heavyweight and must be done statically. Anyway, without proper tail calls inlining on JIT level won't help much. > it's fundamentally impractical Everyone who ever tried implementing any ML-like language on top of JVM failed miserably. |
How is "ML-like" defined here? AFAIK, Haskell is usually considered "ML-like", and Frege is a Haskell dialect implemented on the JVM.