News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 Beta by Manishearth on Friday April 03, 2015 @02:14PM (#9317445)
To add to the other comments, Rust prefers to make error cases explicit. We have memory safety. You can opt out of it, but you have to opt out explicitly. We have exhaustive match. You can use a wildcard, but you need to explicitly do so. We have nullables and Results. You need to explicitly acknowledge the error/null case, or use `unwrap()` to say that you don't mind a panic at this point.

This leads to verbosity at times, but usually its a good verbosity.

Re:Announcing Rust 1.0 Beta by mrec on Friday April 03, 2015 @06:51PM (#9319054)
I'm sure I'm not the first (or the hundredth) to say this, but `unwrap` has always struck me as a horribly innocuous spelling of "yes, feel free to crash here".

I presume there is (or could be) a standard lint to prevent this getting into production code, but it still feels kind of icky.

Re:Announcing Rust 1.0 Beta by steveklabnik on Friday April 03, 2015 @06:59PM (#9319090)
We almost changed it to `assert` but that made some people _really_ upset.
Re:Announcing Rust 1.0 Beta by rat87 on Saturday April 04, 2015 @04:12AM (#9320338)
Dammit, I kept wondering why it wasn't named unwrap_or_panic/unwrap_or_assert but it could be worse at least unwrap is a less friendly name then scala's get.
Re:Announcing Rust 1.0 Beta by Manishearth on Saturday April 04, 2015 @01:27AM (#9320015)
`.expect()` is slightly better (you can give it a string that will become a part of the panic message)