2 ms·
It's a tradeoff. Alternatives like exception handling make control flow less obvious and shorthands like the ? operator lock you into a specific return type (Re
by hgs3 2y ago
It's a tradeoff. Alternatives like exception handling make control flow less obvious and shorthands like the ? operator lock you into a specific return type (Result<T,E> in the case of Borgo or Rust).
- throw-the-towel 2y agoWhat's bad about locking the programmer into using Result<T, E> or Option<T>? These are enough for many common use cases, and anyway, you're free to use something else and unwrap it manually.