Thoughts on GoLang - Part 1
Couple of years ago, one of my friends wanted me to look at golang. Back then, golang was a shiny language and there was a lot of hype around it. I briefly look at the language and I had two primary concerns back then: Lack of generics: No longer exists now as generics were added in go 1.181. Better ergonomic error handling: This problem even exists at the time of writing. Most of the times I see a common pattern mentioned below: // common pattern result, err := fetch_value() if err != nil { return nil, err } I wish there was a way2 in which I can return an error if I don’t want to deal with it. Something along the lines of: ...