lua-users home
lua-l archive

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


>From lua-l@tecgraf.puc-rio.br  Tue May 30 21:24:44 2000
>From: Steve Dekorte <steve@dekorte.com>
>
>Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>> We cannot have the syntax
>> 	"foo".test
>> because of ambiguity. The code below
>> 	a=b
>> 	"foo".test
>> is parsed as a=b"foo".test, which is equivalent to
>> 	a=b("foo").test
>
>How about using a semicolon?:
>
>  a=b;
>  "foo".test

It could work, but doesn't because the parser has to handle the case without
the semicolon too.
Having optional semicolons was probably a mistake in the design of Lua. :-(
--lhf