On Sat, Dec 7, 2013 at 3:33 AM, spir <[email protected]> wrote:
> But the issue exists anyway... dunno about solution. In fact we'd ned to
> invert the logic: instead of:
>         x = foo()               // Option element wrapping possible result
>         x = foo().unwrap()      // bare result
> think:
>         x = foo().option()      // Option element wrapping possible result
>         x = foo().direct()      // bare result

In what way is this better? Seems to me it's a basically functionless
layer of abstraction, and things that don't always have a usable
result should always return option, and if you want them to fail, you
can request failure via .unwrap(). If this is too verbose, then we
should make it less verbose, e.g. `x = *foo()` or something.

Or we can keep the status quo, which seems fine to me. I'm not really
picky about verbosity.

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

Reply via email to