News for hackers. Stuff that matters.
Re:Using unwrap() in Rust is okay by carlmr on Tuesday August 09, 2022 @03:13AM (#32395063)
This is why I write in a 2-pass manner quite often. In the first pass I use unwrap a lot to get the functionality going. In the second pass I search for all the unwrap and expect and take a moment to think about in what cases these may happen.

This works for me really well to get a prototype going, but then have a solid program later. Because the unwrap/expect is so easy to search for, that you can really postpone the error handling until later.

There are no comments on this comment yet.