3 ms·
Initial Thoughts on Clojure
- stonemetal 17y agoEvery time I read an article about clojure they mention the fact that the JVM doesn't support TCO, now call me crazy but last time I checked X86 didn't directly support TCO either and scheme seems to be doing it just fine. Anyone know what it is about the JVM that makes TCO so hard?
- lukego 17y agoJVM doesn't have a way to call another method without pushing the caller onto the stack. x86's jump instruction does that, and on x86 you can directly change the stack pointer too.
- stonemetal 17y agoIt seems like you could work around it. Have a function eval that evaluates each function called. Each function is modified such that it returns either enough information for eval to make the tail call or the value returned by the function which eval would return.