lua-users home
lua-l archive

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


>Oh, goody. I got confused, because I tried writing:
>
>(plus(3))(4)
>
>and this seems to be illegal (which is a little counter-intuitive: adding
>extra brackets shouldn't matter).

But expressions beginning with brackets introduce ambiguity:

	a=b
	(f)(2)

The code above is parsed as a=b(f)(2) not as a=b;(f)(2).
Some languages have a rule that newlines end statements if it makes sense to
do so, but isn't that confusing too? Plus I don't think it would be easy to
add this feature to the Lua parser.
--lhf