by bionoid · 5y ago · 0 comments
true and false or true
true ? false : true
These are not equivalent. If the second argument is evaluated as false, the “ternary” breaks.Lua suggests to use this as ternary, but it has only two false values (nil, false), which reduces the number of problematic cases a little.