lua-users home
lua-l archive

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


What about the noise produced by const-by-default style? I would likely use it often even if it's ugly, considering how nice the guarantee is.

On Sun, Jun 2, 2019 at 11:07 AM Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "Dibyendu" == Dibyendu Majumdar <mobile@majumdar.org.uk> writes:

 Dibyendu> Do people find anything ugly about current Lua syntax?

The need to put ; before a statement starting with ( is very ugly.

The "x and y or z" workaround for the lack of a real ternary conditional
operator is ugly and dangerous. (And the popularity of this idiom shows
the need for such an operator.)

Having to use select('#',...) with all its attendant overheads just to
count the number of args to a vararg function is ugly.

 Dibyendu> What about the proposed new syntax <toclose> and <const>?

... meh. It doesn't look too bad to me and the proposed alternatives
seem worse.

--
Andrew.