lua-users home
lua-l archive

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


Dirk,

"Dirk Laurie" <dirk.laurie@gmail.com>:
>
> Would allowing empty tuple and array literals
>    y = ()
>    x = []
> introduce an ambiguity?

I know I'm a bit slow but never saw the answer to your exact original question, so:

x=A[[]] becomes ambiguous (function call with empty string argument vs indexing with an empty tuple index)

If you treat () as {} and "", A() becomes ambiguous as well.

This is rather obvious so you must have found out by now, so sorry for the noise.

Best regards,

--
DoubleF