News for hackers. Stuff that matters.
Re:Rust's language ergonomics initiative by staticassertion on Friday March 03, 2017 @05:07PM (#13787254)
That would this in rust: if number { true } else { false }

If it's the last expression it will implicitly return the values. Easily fits on one line.

Re:Rust's language ergonomics initiative by twic on Friday March 03, 2017 @05:46PM (#13787601)
My one puny objection to this is that rustfmt won't put the arms on a single line, but will always break and indent around the blocks. That makes Rust's expression-if considerably more verbose than what Perl has, or even the ternary operator.
Re:Rust's language ergonomics initiative by staticassertion on Friday March 03, 2017 @09:46PM (#13788862)
Hm. I wonder if this is configurable, or if there's an RFC open for this.