lua-users home
lua-l archive

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


On Monday, August 04, 2014 11:58:07 AM Jay Carlson wrote:
> is difficult to require to be a tail call, since the return values stack
> will exhaust all memory regardless of whether activation records do.

Certainly. However since Lua allows ... you'd encounter the same problem with 
this

    function F(...)
      return F(x, ...)
    end

(A problem that I don't believe exists in Scheme.)

A looser definition of tail call would still save some space by hoisting each 
call above the return values while still discarding intermediate frames.

-- 
tom <telliamed@whoopdedo.org>