lua-users home
lua-l archive

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


> Is syntactic sugar for:
>     local t = some_table_expression
>     local a, b, c = t.a, t.b, t.c

That's almost exactly what I do, sans sugar.

    local s, t = string, table
    local s_byte, s_sub, t_concat, t_insert, t_remove, t_unpack
        = s.byte, s.sub, t.concat, t.insert, t.remove, t.unpack

I type them using the multiple cursor option in my editor, then change
the underscores to dots.

The alignment (hopefully your mail client uses a fixed width font)
makes it easier to spot errors.

You must like prefixes, though.

-- Pierre-Yves