Even with refutable `let`s, I think there's still a good case for having 
`.unwrap()`-style APIs on enums, which is that often you need to unwrap an enum 
inside a larger expression. A refutable `let` only works if you're actually 
using a `let`-binding to begin with.

-Kevin

On Dec 23, 2013, at 1:24 PM, Simon Sapin <[email protected]> wrote:

> On 23/12/2013 22:19, Liigo Zhuang wrote:
>> Code full of .unwrap() is not good smell I think.
> 
> I agree, and I wrote in the first email that it is one of the downsides.
> 
> But doubling the API (from_utf8 and from_utf8_opt) is also not a good smell, 
> so it’s a compromise to find.
> 
> -- 
> Simon Sapin
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to