[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the benefits of immutability
On Tue, Aug 19, 2003 at 01:27:53PM -0400, Joe Marshall wrote:
> > > 7. In general, no tail recursion.
> > Rather,
> > 7. In general, no tail calls.
> A rose by any other name...
> Did anyone think I was talking only about self calls?
I'll admit to being picky here, but I think it is an important
distinction. Some implementations do optimize tail recursion by
converting it into an iterative construct but they don't optimize
other tail calls. gcl (gnu common lisp) is an example I came across
recently. It compiles to C and from there to native code, so tail
recursion is relatively easy to deal with (a transformation to a C
iteration construct within the C function definition) but other tail
calls are much harder.