Re:Gotchas, Irritants and Warts in Go Web Development
by abraininavat on Thursday March 07, 2013 @02:10PM
(#5339486)
It's extremely generous... hell it's just wrong.. to call Go's NullString/NullBool/etc monads. "Monad" is not a synonym for "Wrapper type"
Re:Gotchas, Irritants and Warts in Go Web Development
by Tyr42 on Thursday March 07, 2013 @03:05PM
(#5339827)
Well, they do correspond to the "Maybe a" for some fixed type a, and Maybe is a monad, however you are right that it would be clearer to to say Maybe or Nullable or Option type, since that's what is meant, not some general monad.
I haven't used SQL databases with Go much, so I'm just looking at NullFoo types now for the first time, but every time I've thought I could improve on the design of Go in some way, the folks on #go-nuts have (kindly) shown me that I wasn't really thinking about things the right way. So, there's probably some reason that it's been designed this way, but I'm saying that purely based on prior experience with other Go matters, not with package "database/sql".