lua-users home
lua-l archive

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


On Mon, Aug 23, 2010 at 8:41 PM, RJ Russell <russellsprouts2@gmail.com> wrote:
> I propose allowing this in a table constructor.
>
> {function name()end}
> rather than
> {name=function()end}

Sounded familiar ;)  http://lua-users.org/lists/lua-l/2010-01/msg01600.html

> something={
>  if a then b=3
>  else b=4
>  end
> }

Related: http://lua-users.org/lists/lua-l/2010-06/msg00249.html

On Mon, Aug 23, 2010 at 8:50 PM, Jonathan Castello <twisolar@gmail.com> wrote:
> The dropped "in some_env do ... end"
> statement is probably closest to what you're asking for, though.

However, things like `local a; return {a=a}` and `local a in env do a
= a end` differ in these ways: In the former, {} creates a namespace
for sets not gets.  In the latter, env creates a namespace for both
gets and sets, and local override it.