
On Mon, Feb 8, 2010 at 5:16 PM, John Meacham
On Tue, Feb 09, 2010 at 10:42:26AM +1000, Tony Morris wrote:
I expect others have forethought and perhaps even experimented with such a language. Are there any dangers to be wary of that undo the entire endeavour?
There have been a couple papers published on it, the main sticking point seems to be tail call elimination. When targeting real hardware you always had the option of dropping to assembly to do a direct jump, but there isn't an equivalent in the JVM. If you look up tail call + jvm you will probably get a few hits. I believe there are even a couple haskell specific papers on the issue.
I think .NET 4.0 has tail-call optimization built in because I remember reading that F# relies on such a mechanism. AFAIK you just need to mark the bytecode as "to be optimized" and the runtime does that for you.