I wish that golang had a option/maybe type. I don't care if it's builtin/magic. Would be really useful.
@ReinH @halorgium @evanphx it's an enum: enum Result<T,E> { Ok(T), Err(E) }
-
-
@wycats@halorgium@evanphx It’s just weird to see something that looks like tuple notation (which is a product) used for something sum-like -
@ReinH@wycats@halorgium@evanphx That syntax was probably inspired by template syntax in C++. -
@_mlen@wycats@halorgium@evanphx I wish less things would be inspired by C++ ;) -
@ReinH@_mlen@halorgium@evanphx it's just a generic :) type CargoResult<T> = Result<T, CargoError> -
@wycats@_mlen@halorgium@evanphx Right, but I’ve never been happy with this syntax anywhere. :p -
@ReinH@_mlen@halorgium@evanphx really? It feels really intuitive to me -
@wycats@_mlen@halorgium@evanphx It’s like driving on the “wrong” side of the street. ;) -
@ReinH@_mlen@halorgium@evanphx makes sense :)
End of conversation
New conversation -
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.