lua-users home
lua-l archive

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


On Wednesday, July 06, 2011 03:09:37 PM David Hollander wrote:
> Since the local scope does not have table semantics where it is
> indexable by an evaluation:
> local [getname()] = 3
> 
> why not disrequire the use of the 'function' keyword when 'local'
> is present?
> 
> local function success(items, total)
>   reply(client, view.list(items, total))
> end

One reason not to do that is because "function" is self-documenting 
code, and typing it isn't a big hassle.

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt