Re: [ANN] Microlight (was Re: paving cowpaths with libraries)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANN] Microlight (was Re: paving cowpaths with libraries)
- From: Patrick Rapin <toupie300@...>
- Date: 2012年2月17日 09:09:38 +0100
> Although "local function X ... end" is basically syntax sugar for
> "local X = function ... end", it isn't exactly equivalent, as this
> example shows: The former syntax makes the definition visible to the
> function body, whereas the latter syntax does not.
The manual [2] is clear about this: "local function X ... end" is
equal to "local X; X = function end" and NOT to "local X = function
end".
This makes the use of recursive local functions easier to write.
[2] http://www.lua.org/manual/5.2/manual.html#3.4.10