[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Sugar Free Diet?
- From: Coroutines <coroutines@...>
- Date: Sun, 4 May 2014 07:06:56 -0700
local function foo() ... end -- hides the part where it
forward-declares the identifier for use within the same function
I've said this before, but I avoid writing functions with that form
because I like 'function' and 'end' lining up on indentation levels.
It just looks a bit funkey to do the forward declaration yourself for
recursive functions:
local foo = nil -- I prefer to assign nil at minimum
foo =
function (x, y, z)
...
if some_condition then
foo(x, y, z)
end
...
end
[/tangent]