@halorgium @evanphx agreed. There are lots of cases in Rust where a legacy Option<T> should really be a Result<T, E>
-
-
Replying to @wycats
@wycats@halorgium@evanphx Wait, Result<T,E> is a sum type? I don’t Rust (yet).2 replies 0 retweets 0 likes -
Replying to @ReinH
@ReinH@halorgium@evanphx it's an enum: enum Result<T,E> { Ok(T), Err(E) }1 reply 0 retweets 0 likes -
Replying to @wycats
@wycats@halorgium@evanphx It’s just weird to see something that looks like tuple notation (which is a product) used for something sum-like1 reply 0 retweets 0 likes -
Replying to @ReinH
@ReinH@wycats@halorgium@evanphx That syntax was probably inspired by template syntax in C++.2 replies 0 retweets 0 likes -
Replying to @_mlen
@_mlen@wycats@halorgium@evanphx I wish less things would be inspired by C++ ;)1 reply 0 retweets 0 likes -
Replying to @ReinH
@ReinH@_mlen@halorgium@evanphx it's just a generic :) type CargoResult<T> = Result<T, CargoError>3 replies 0 retweets 0 likes -
Replying to @wycats
@wycats@_mlen@halorgium@evanphx Right, but I’ve never been happy with this syntax anywhere. :p1 reply 0 retweets 0 likes -
Replying to @ReinH
@ReinH@_mlen@halorgium@evanphx really? It feels really intuitive to me2 replies 0 retweets 0 likes -
Replying to @wycats
@wycats@_mlen@halorgium@evanphx It’s like driving on the “wrong” side of the street. ;)1 reply 0 retweets 0 likes
@ReinH @_mlen @halorgium @evanphx makes sense :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.