On Jan 12, 2008 1:26 PM, Jorge Visca <
xxopxe@gmail.com> wrote:
Duck wrote:
> Bear in mind (sorry, this doesn't actually answer your question, but
> is just an observation on a neat feature of Lua which you might not be
> aware of when creating state machine code) that Lua supports proper
> tail calls,
> meaning that if the value a function returns is computed _directly by
> calling another function_, that call (the tail call) is implemented as
> a jump, not as a call.
Yeah, i've noticed this reading the PiL on-line. I had to stop reading
it halfway because i was getting a "neat feature" overdose. As soon as i
get a feeling for closures and functions as first class values, i'll go
further. :)
Jorge