lua-users home
lua-l archive

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


On Wed, 13 Jan 2010, David Kastrup wrote:
> Tony Finch <dot@dotat.at> writes:
> >
> > If you implement a state transition as a non-tail-call then you'll get
> > unbounded stack growth.
>
> Not if you can get back to the same state only via a state transition
> implemented as a return.

But my point is that you can replace state transitions like this:

	goto newstate;

with this:

	return newstate()

Other kinds of function calls or returns are not clean state transitions.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.
MODERATE OR GOOD.