News for hackers. Stuff that matters.
Re:Rust for JavaScript Developers – Functions and Control Flow by jfkebwjsbx on Monday July 06, 2020 @09:11AM (#23747487)
I love that idea, but I still prefer it’d read the same as an if. Meaning the condition first and the false case last.
Re:Rust for JavaScript Developers – Functions and Control Flow by nicoburns on Monday July 06, 2020 @10:04AM (#23747942)
Rust implements this:

    let foo = if is_employed() { 2000 } else { 0 }