lua-users home
lua-l archive

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



Referring to the recent switch/case discussion (yet another one!), would it be possible for the Lua parser to see 'do' in the code below the same as 'function()'. This syntactic sugar would make short inline functions much less code-cluttering; basically the concept of a code block is there allright.

    switch( v,
        { "help", do help=true end },
        --
        { nil, do table.insert( input, v ) end }   -- default
        )

What do you think, or should I just shut up? :)

-ak