On Thu, Aug 23, 2012 at 8:16 PM, Jeffery Olson <[email protected]>wrote:

>
> And, to be fair, another major plank of the linked post was that
> Option-style library APIs aren't ubiquitous even in Scala, and
> certainly not in the larger Java Class Library. This is not true for
> Rust, where Options<T> (or Result<T, U>)-style APIs exist
> idiomatically through the libraries ...


I am still new to using a language with an Option type (I come from an
imperative language background,) but wouldn't it be preferable to try to
mitigate the number of calls that return an Option type as opposed to
returning an actual reference as references cannot be null/nil in Rust? Of
course that probably does not apply where an error or failure might happen
(such as IO).

Thanks,

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

Reply via email to