[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: new thought experiment: what would you add to Lua ?
- From: Andrew Gierth <andrew@...>
- Date: Sat, 15 Sep 2018 00:00:23 +0100
Ternary (conditional) operator. Using (x and y or z) has become an
idiom, which shows the real demand for such a feature, but the fact that
it breaks when y is false or nil makes for a lot of landmines.
Something like #... to return the number of varargs without needing to
pass them all to another function as in select('#',...).
--
Andrew.