lua-users home
lua-l archive

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


2013/3/8 TNHarris <telliamed@whoopdedo.org>:
> On Thursday, March 07, 2013 09:29:14 PM Newton Kim wrote:

> For that matter, we can also get rid of one of 'and' or 'or'. If 'or' is
> dropped, then get used to typing 'not (not X and not Y)'. I'm sure everyone
> will be much happier without the needless complexity of having two binary
> logic operators where only one will do.

Actually the equivalence is valid only when X and Y are known to be
boolean. The right method is to get rid of both 'and' and 'or'. Just get
used to typing
'(function(a,b) if a then return a else return b end end)(a,b)'
instead of 'a or b'.