lua-users home
lua-l archive

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


On Nov 7, 2007 5:50 PM, Ralph Hempel <rhempel@hempeldesigngroup.com> wrote:
> I'm not sure there's a really compelling argument for switch in Lua.
> In some ways, switch is just syntactic sugar for lookup tables or
> a nested if as far as the compiler is concerned....

The variety of debates about switch/case/match _semantics_ means that
it's unlikely to ever get into the core. Generally, Lua _features_ are
pretty transparent (except something like handling ..., which is not a
value) but the _libraries_ do all the subtle & interesting things.

Still, I like 'with t/"(%d+) (%d+) then' but it should remain macro
magic for now ;) Otherwise it will all end up like Perl, and waiting
for the next version of Lua will become like waiting for the second
coming of Larry Wall and the Parrot of the Apocalypse.

steve d.