2 ms·
With this proposal the variants are simply types themselves, so you'd have a struct Ok[T] and Err [T], and thus Result<T, E> would be something like interf
by masklinn 5y ago
With this proposal the variants are simply types themselves, so you'd have a struct Ok[T] and Err [T], and thus Result<T, E> would be something like
interface Result[T, E] {
for Ok[T], Err[E]
}
And there’s no issue with having T=string and E=string.