lua-users home
lua-l archive

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


On Sun, Sep 12, 2010 at 11:03 PM, Doug Rogers <douglua@dkrogers.com> wrote:
I have a small preference for requiring 'end', just for consistency with the statement version.

I would argue that it is inconsistent with the Lua-wide convention that the "end" keyword terminates a block of statements, never an _expression_.

Lua's grammar is designed in such a way that the end of an _expression_ can almost always(*) be determined without an explicit termination keyword. This is BTW what makes most syntax extension proposals messy and/or ambiguous and/or alien feeling.

(*) the only exception I can think of, and which doesn't feel right IMO, is the fact that "foo(bar)(gnu)(gnat)" is understood differently from "foo(bar)\n(gnu)(gnat)".