DEV Community

Discussion on: Simple Idea for Improving Error Handling of Go

Collapse
 
madhadron profile image
Fred Ross

Congratulations, you've just discovered the Maybe monad!

I prefer the unwrapped version in Go because the cases where this is likely to be useful will be surrounded by cases where you're checking errors from other things than writers, and putting this layer in means a sudden jump in the abstractions employed, which makes the code less readable.

Collapse
 
chenge profile image
chenge

could you show some code?