Y
Hacker News
new
|
ask
|
show
|
jobs
by
catacombs
2230 days ago
From your example, an even more concise way can be written using ternary operations in any C-style language:
int i = 10; bool is_10 = (i === 10) ? TRUE : FALSE;