Golang is so fun to write

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • filter

    Simple apply/filter/reduce package.

  • A few points that stood out to me: error handling in Go is generally pretty good. It's much more performant compared to throwing exceptions and the high frequency of error handling helps a lot with debugging and avoiding unexpected errors. What you've described as "poor OOP'ish" is partly true, yes Go does poor OOP, because it doesn't try to do OOP. The language favours composition over inheritance. Strongly applying OOP concepts in Go is simply not using the language in its intended way. For implicit interfaces, it's completely fair that you don't like them, but it's not a disadvantage of the language. I for one find implicit interfaces very intuitive and feel it's the right way for it to be done. No function overloading and lack of ternary operations is absolutely intentional, both of these are overcome by writing more expressive code, which is not a bad thing. Similarly with no built in map/filter/find, these can be achieved using for-loops. Reference https://github.com/robpike/filter for Rob Pike's implementation of filter, stating in the readme that there's not much use for it and to just use for-loops instead. Last thing, enums are expressed using iota: https://go.dev/ref/spec#Iota

  • GJSON

    Get JSON values quickly - JSON parser for Go

  • Here your inexperience is showing. gjson makes this a breeze. It's been available for many years and it's standard in most Go projects that deal with JSON. https://github.com/tidwall/gjson

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • go

    The Go programming language

  • BTW there was a proposal to address exactly that, which again you say its a GO philosophy and GO team ignored what has worked well in other languages and chances are GO might add this. Then what will you say? will you then agree that you were wrong? Just check this https://github.com/golang/go/issues/34996 (its closed but a lot of good discussion and its insane that this even had to be brought up to people who are smart enough to design GO).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts