3 ms·
> I think the biggest win has been treating error as value and returning error via multiple return values paradigm. Treating errors as value is cool (no except
by littlestymaar 7y ago
> I think the biggest win has been treating error as value and returning error via multiple return values paradigm.
Treating errors as value is cool (no exception!) but using multiple values not so much, the proper way to do so is with product types, but Go's type system don't have them unfortunately…
- atroche 7y agoDo you mean sum types? Like Haskell's Maybe and Rust's Result?
- littlestymaar 7y agoSum types indeed, thanks. That's why I shouldn't post before breakfast.