lua-users home
lua-l archive

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


On 19 January 2012 11:58, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Thu, Jan 19, 2012 at 1:24 PM, Egil Hjelmeland
> <privat@egil-hjelmeland.no> wrote:
>>  t[#] means t[#t]
>>  t[# -1 ] means t[#t -1]
>>  t[#  + 1 ] = 'syntactic sugar'
>
> That feels better, and is more general than t[].  Although I suppose
> it becomes a special case in the grammar, an implicit # operator, and
> I know most Lua followers are reluctant to complicate the syntax
> further.

Possibly just the sort of thing people can add themselves (if they
like it) with a tool like LuaMacro...

Alex