|
|
|
|
|
by peter_l_downs
2187 days ago
|
|
Take a look at the comment tree starting here in the Generics announcement thread from the other day for some discussion of Option[V] under the current proposal: https://news.ycombinator.com/item?id=23545361 For what it worth, returning `(value, err)` is conceptually the same thing as returning a Result[V]. You can ignore the error case on a result / the None case on an option as easily as you ignore the `err` today. |
|
The point of a result type is that you _cannot_ ignore the None case. Any method that would provide you with the value will also check that the error is not present.
In comparison, you can happily ignore `err` in Golang and continue with an invalid `value`.