Hacker News
new
past
comments
ask
show
jobs
points
by
userbinator
2 hours ago
|
comments
by
AlienRobot
1 hours ago
|
[-]
This is one of the things I like about Rust. You can have both.
let foo = { if bar { 1 } else if baz { 2 } else { 3 } };
Unfortunately not all languages are Rust.
reply
by
userbinator
1 hours ago
|
parent
|
[-]
That isn't more concise than
foo = bar ? 1 : baz ? 2 : 3;
reply
by
AlienRobot
1 hours ago
|
parent
|
[-]
But it's more readable, and that's what matters.
reply