[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: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 17 Nov 2013 11:04:02 +0200
2013/11/17 Rena <hyperhacker@gmail.com>:
> As someone who strongly dislikes repetition, I can see it being nice to be
> able to write something like:
> local insert, concat from table
> but then I feel like I'd rather name them tinsert and tconcat to make it
> clearer where they came from, and then I'd have to specify the original
> names to extract from table, and then we're back to:
> local tinsert, tconcat = table.insert, table.concat
> which still repeats 'table', but I don't see a good way to avoid that
> without a severe loss of clarity.
local ENV=_ENV
_ENV=table
-- define locals from table
_ENV=string
-- define locals from string
_ENV=ENV
... but maybe that counts as a severe loss of clarity.