lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

David Haley wrote:
> Can anybody explain why he claims that Java has no recursion?

It doesn't do tail-call elimination. When you come from the
Scheme or ML school of thought, this means it's completely
inadequate. Another proof of the Sapir-Whorf hypothesis [*].

[ Note that some JVMs eliminate self tail-calls (which is easier),
but AFAIK none have generic tail-call elimination. There are
multiple reasons why this is difficult with Java and the JVM
(e.g. security model, premature finalization and so on). Search
for "tail call elimination" and "Java". ]

[*] http://en.wikipedia.org/wiki/Sapir-Whorf_hypothesis

Bye,
     Mike