[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: fun with table constructors
- From: Nikos K Gorogiannis <N.K.Gorogiannis@...>
- Date: Tue, 30 Jan 2001 13:17:10 +0000
Luiz Henrique de Figueiredo wrote:
> But expressions beginning with brackets introduce ambiguity:
> 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.
I may be stepping on language designers' toes here, but I always wanted
to ask this: (regardless of the functional programming examples), why
isn't it the case that a semicolon must always be present to end the
statement? I know that a change like this isn't feasible now, with all
the code that would be broken, but I just wanted to hear about the
rationale of this choice.