Y
Hacker News
new
|
ask
|
show
|
jobs
by
matheusmoreira
5 hours ago
> The classic Lua idiom a and b or c has a pitfall when b is nil or false: then c is returned, even when a is truthy.
> E.g. true and false or 42 returns 42, whereas true ? false : 42 returns the (expected) false.