Hacker News new | ask | show | jobs
by littlestymaar 2440 days 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…

1 comments

Do you mean sum types? Like Haskell's Maybe and Rust's Result?
Sum types indeed, thanks. That's why I shouldn't post before breakfast.