lua-users home
lua-l archive

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


On Thu, Jul 5, 2018, 12:04 Roberto Ierusalimschy, <roberto@inf.puc-rio.br> wrote:
> 2018-07-05 14:52 GMT+02:00 szbnwer@gmail.com <szbnwer@gmail.com>:
>
> > 'str':fun() and {}:fun() would be nice to see. i
> > can only remember that the reasoning against this was 'cuz the refman
> > says so' :D (probably that was you, Dirk, you are the local refman
> > guru (that i like to see! :) ))
>
> I can't find the thread but the clincher for me was a demonstration
> (not by myself) that a syntax ambiguity could arise.

A syntax ambiguity is already there; these cases would make it worse:

  -- already ambiguous:
  a = b + c
  ('str'):fun()

  -- new ambiguity:
  a = b + c
  'str':fun()

  -- new ambiguity:
  a = b + c
  {}:fun()

-- Roberto

All three of those look like the same case, really.