lua-users home
lua-l archive

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


On Fri, Jul 10, 2015 at 2:38 AM, Coda Highland <chighland@gmail.com> wrote:
On Thu, Jul 9, 2015 at 4:30 PM, slayer beast <slayerbeast@gmail.com> wrote:
> I would love to have a syntax like this:
>
> some_table['a_name', 'another'] = a, b

Sadly this conflicts with one of the suggestions for the tuple-keyed
table proposal. We can't have them both.

This is tuple-keyed assignment:
some_table['a_name', 'another'] = c

And this is two distinct assignments:
some_table[ ('a_name', 'another') ] = a, b

Old good idea: parentheses mean converting a tuple to a single value.