News for hackers. Stuff that matters.
Re:Stroustrup's Rule and Layering Over Time in Rust by imron on Saturday December 17, 2016 @03:05AM (#13199812)
Have a read of the rust release notes [0] to see why the ? operator actually improves code readability.

It's not obvious from the simple example given the original article, but as the release notes mention it makes things like the following:

try!(try!(try!(foo()).bar()).baz())

much more readable:

foo()?.bar()?.baz()?

If the main concern is readability of code, the latter wins hand down.

0: https://blog.rust-lang.org/2016/11/10/Rust-1.13.html

There are no comments on this comment yet.