[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion for 5.3: import() for creating a "slew" of locals
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Mon, 18 Nov 2013 15:20:31 +0100
> 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