Re: Rules engine in Lua?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Rules engine in Lua?
- From: Jorge Visca <xxopxe@...>
- Date: 2008年1月11日 22:26:57 -0200
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