logoalt Hacker News

vips7L • yesterday at 6:31 PM • 1 reply • view on HN

Exceptions are values. There's nothing different between:

    T someFn() throws E;
    fn someFn() -> Result<T, E>;
    func someFn() (T, E)

Replies

Dr_Emann • yesterday at 7:09 PM

In only one of those examples do you get a T that's invalid.

➕ show 2 replies