3 ms·
As it rightfully should. God forbid people start returning Result[T] types instead of (T, error) and splintering the ecosystem. Option types are pointless if y
by SPBS 5y ago
As it rightfully should. God forbid people start returning Result[T] types instead of (T, error) and splintering the ecosystem.
Option types are pointless if you don't have exhaustive pattern matching to ensure correctness.
- 4ad 5y agoGo's type system is actually expressive enough to ensure exhaustiveness, although it's non-obvious and syntactically heavy and impractical. I am working on a paper that will explore this.