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 <catwell@archlinux.us> 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 ( https://www.lua.org/manual/5.3/manual.html#3.3.1 ).

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)

and

  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 :-)


--
--