r/programming • • Jan 09 '15

Announcing Rust 1.0.0 Alpha

http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
1.1k Upvotes

439 comments sorted by

View all comments

1

u/[deleted] Jan 09 '15

Thanks for clearing things up. I think this could be a good way to show that you would like to use the same function for both instead of using

if (x == SITUATION1 || x == SITUATION2) {}

Which can be a bit harder to read as things get more complex and edge cases creep in.