lua-users home
lua-l archive

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


On Thu, Jan 19, 2012 at 04:40, Egil Hjelmeland
<privat@egil-hjelmeland.no> wrote:
> Has it been considered:
>   t[] = 'syntactic sugar'
> be syntactic sugar for
>  t[#t+1] = 'syntactic sugar'
>
> , like in PHP?
>

This shortcut would be useful. Typing

my_long_descriptive_table_name[#my_long_descriptive_table_name + 1] = val

can be quite tedious.

--Leo--