lua-users home
lua-l archive

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


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.