News for hackers. Stuff that matters.
Re:Flix – A powerful effect-oriented programming language by jorkadeen on Thursday July 10, 2025 @02:12PM (#44523877)
We have to emulate tail calls using trampolines. This means that in some cases we have to represent stack frames as objects on the heap. Fortunately, in the common case where a recursive function simply calls itself in tail position, we can rewrite the call to a bytecode level loop and there is no overhead.
Re:Flix – A powerful effect-oriented programming language by exceptione on Thursday July 10, 2025 @02:19PM (#44523950)
Thanks for explaining that term. That sounds really bad indeed. Maybe this is way too technical, but representing them as stack pointers was unfeasible?
Re:Flix – A powerful effect-oriented programming language by jorkadeen on Thursday July 10, 2025 @02:24PM (#44523995)
The JVM (and other VMs for that matter) do not grant direct access to the stack.

But the good news is that the common case incurs no overhead.