News for hackers. Stuff that matters.
Re:Two commutes with Rust by readams on Thursday May 21, 2015 @06:30PM (#9585762)
a = if b > 1 { 1 } else { 2 }

is equivalent to:

a = b > 1 ? 1 : 2

in other languages. Meaning that the if/else statement can be used as an expression that can provide an rvalue of integer type.

There are no comments on this comment yet.