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

Re: A plea for a new old language




You can fake tail calls as well, using a method known as trampolining.

Mike

> From: "Steven Shaw" <steven_shaw@iprimus.com.au>
> Date: Mon, 12 May 2003 12:49:29 +1000
> 
> > After talking to one of my compiler-guru friends, I found out that,
> > amazingly enough, you *can* do CPS in C, even without first-class
> > functions.  You have to lift the internal lambda expressions to the top
> > level and name them, and have an extra argument representing the state
> > captured by the lambda, yadda yadda, but it's doable.  I guess Real
> > Programmers can write scheme in any language ;-)
> 
> It wouldn't be efficient without tail call optimisation though, would it?
>