[plt-scheme] Getting wine from water
> If you are writing a compiler in language X that does not support
> feature Y can your compiler implement feature Y.
>
> Specific question:
>
> If you are writing a compiler in Java (which does not support tail call
> optimisation) .........
Hi Wooks,
In the particular case about tail optimization, see Dan Friedman's "The
Role of the Study of Programming Languages in the Education of a
Programmer":
http://www.cs.indiana.edu/~dfried/dfried/mex.pdf
The whole talk is Good Stuff. Starting around page 14 of his lecture he
addresses a topic I think you'll especially like.
His paper on "Trampolined Style" is one possible way to make tail-calls
work:
http://www.cs.indiana.edu/hyplan/dfried/ts.ps
It's the approach I used in my toy project "pyscheme" to get tail calls to
work in an environment (Python) that didn't support it. You might like to
see some notes I wrote on it here:
http://hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/baypiggies_notes/slides.pdf
Best of wishes!