lua-users home
lua-l archive

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


I would love to have a syntax like this:

some_table['a_name', 'another'] = a, b


On Thu, Jul 9, 2015 at 7:25 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2015-07-09 19:13 GMT+02:00 Andrew Starks <andrew.starks@trms.com>:
>
>> I will not rest until we can use Lua patterns for variable names:
>>
>> .*_foo = nil
>
> Does this mean
>
> for k in pairs(_ENV) do if type(k)=="string" and k:match"_foo$" then
>    _ENV[k] = nil
> end end
>
> ? If so, I find it quite easy to rest (go to bed, in fact; local time is 00:24)
> without having a lump of syntactic sugar.
>