lua-users home
lua-l archive

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


RLake@oxfam.org.uk wrote:
> 
> Nonetheless, I don't like the idea of having one default for function and a
> different default for variables.

There's no difference.  The local-statement introduces a new local as does
the for-statement or the new definition of the function-statement.  It only
tries to give a more sensible semantic to the "syntactic sugar" of the
function-statement (that it introduces a new local).

> local function f(args) body

I thought about that too.  But I prefer the local to be implicit.  You don't
want to write "for local i=1,100 do..." either ;-)

Ciao, ET.