[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [CFD] Local functions for Lua 4.1
- From: Edgar Toernig <froese@...>
- Date: Wed, 21 Nov 2001 23:55:10 +0100
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.