Tail call elimination

bearophile bearophileHUGS at lycos.com
Thu Nov 27 09:59:32 PST 2008


bearophile:
>- I have shown two documents (an HTML page and a pdf) that talk about two possible ways to implement forms of tail call elimination. One of similar ways can be used by DMD to perform some forms of tail call optimization so it can respect the D specs :-)<

They are ways to "cheat", so they may be used where a proper tail call elimination (TCE) isn't doable, for example in the current Java Virtual Machine. If you look at Closure, it's a very Lisp-like language written for the JVM, and it's quite functional. It has to do loops and twists to allow some forms of tail-call elimination that Scheme programmers naturally expect Closure able to do. Today there are several people that push to see TCE into the JVM, because later it can be used by Closure, Scala, etc.

Bye,
bearophile



More information about the Digitalmars-d mailing list