lua-users home
lua-l archive

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

On Fri, Jul 6, 2018 at 12:58 AM Pierre Chapuis <> wrote:
This would be a pretty big change to the language, since as of today newlines have no special meaning in Lua.

For reference, the manual documents the ambiguity and how it is resolved ( ).

The (minor) problem is that most people (programmers that are not Lua experts) trying to understand the code would interpret

   a = b + c(print or write)(3)


  a = b + c
  (print or write)(3)

to be different things. The BCPL approach does not fix everything either:

  f((a or b)(c)) -- this works
  f((a or b)
    (c)) -- the implicit semicolon would break things.

Compared to the use of 'typename' in C++ to give the parser a hint about "qualified dependent types" it's a minor issue :-)