Linj is brilliant! It's a Lisp dialect for translating into Java and it produces readable, editable code:
from the Linj Manual:
Even the language manual is quite entertaining, at least in the beginning. I like the jokes with obfuscated code.
Linj, like CL, saves you from explicitly declaring types. When translating to Java, it infers what the type should be.
from the Linj Manual:
Finally, and because a language is not only syntax and semantics but also pragmatics, Linj also tries to translate between Common Lisp conventions and Java conventions.
Even the language manual is quite entertaining, at least in the beginning. I like the jokes with obfuscated code.
Linj, like CL, saves you from explicitly declaring types. When translating to Java, it infers what the type should be.
(no subject)
Date: 2006-06-02 02:39 pm (UTC)(no subject)
Date: 2006-06-02 03:31 pm (UTC)If not, then Linj couldn´t anyway since it´s interpreted into Java.
If so, then Java will do it when it times comes.
It´s just not Linj´s responsibility to compiler optimizations, is it? Efficiency-aware translation is a good thing though.
(no subject)
Date: 2006-06-02 03:32 pm (UTC)(no subject)
Date: 2006-06-03 07:32 am (UTC)Java does not optimize tail-calls, but it emphasizes an imperative paradigm. Since Linj emphasizes a functional paradigm, it should optimize tail calls. Linj compiles to Java, and therefore it should compile to the most efficient readable Java that it can.
However, your point is still a good one, that Java should optimize them as well. I think the reason why so few compilers perform this optimization is that only academics are concerned with tail recursive functions. Everyone else just programs imperatively in their imperative languages. Recursion is only widely used to traverse log-depth structures.