lua-users home
lua-l archive

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


On 06/06/2015 11:47 PM, Nagaev Boris wrote:
v:abs can be ambiguous:

   v:abs
   (a)

Starting a new line with () is already ambiguous in Lua, I wrote this already last time we have discussed this syntax that this is not an additional ambiguity.
v:abs()
(a)

Is it
1) v:abs()(a)
or
2) v:abs(); (a)
?

Yep, still ambiguous. Actually I would even suggest that in this case, more coders would guess the wrong choice. Lua chooses 1) and therefore it only makes sense to choose 1) in your example as well.
--
Thomas