|
|
|
|
|
by 201984
7 hours ago
|
|
Lua basically already has ternary operators anyway since "and" and "or" short circuit. I also don't see the need of adding additional syntax for it. local x = condition ? value_a : value b
local x = condition and value_a or value_b
|
|
> E.g. true and false or 42 returns 42, whereas true ? false : 42 returns the (expected) false.