Re:Lies we tell ourselves to keep using Golang
by monksy on Tuesday November 26, 2024 @03:33PM
(#42249751)
I agree with you that the sum types are much better and it's intentional that they wanted null support. (Which was a frustrating pick considering the modern dev languages out there).
The coding style encourages the behavior you're talking about. We're back in the C days where you have a result and an error. It's not a good pattern.
Except it doesn't actually. You can totally just ignore it and pretend errors don't exist. Lack of sum types/Result, and pointers as poor mans optional, really hinder's Go's error handling story.