On 30 Okt., 17:26, Malcolm Sharpe <[EMAIL PROTECTED]> wrote:
> Proper tail calls would help sometimes, but not always.
This is sad, but, of course, true.
As I understand you, your optimizations for the CAL language would
help in the
following case:
foo () = let xs = ... in 2+length xs
since the compiler would see that xs is not used anymore after the
call to length and would take care that in the stack frame of foo no
reference to xs retains.
Would it also work in the following case:
foo() = let
xs = ....create long lazy list ....
useless = tail xs;
in 2+length xs;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---