David Brown wrote:
Do you know if anyone other than Chicken Scheme has implemented this?

IIRC, Standard ML also does this.

I'm not sure, but I'm guessing that Gambit also has to do this.

I found it works fairly well, but does tend to generate quite a bit of
garbage, mostly because the C compiler still creates lots of stack frames
that will never be returned from.

Well, that's the downside of continuation passing style. It does, however, automatically handle tail-recursion and makes continuations pathetically easy to implement.

GHC in haskell kind of does something similar, except that they edit the
assembly output of the compiler to get rid of the stack frames.

Aha! So that why GHC is so problematic to port. I always wondered why I always had so much trouble with getting a functioning GHC.

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to