DEV Community

Discussion on: Should I learn Go?

Collapse
 
pbnj profile image
Peter Benjamin (they/them)

Like any tool, Go has pros and cons, use it where it shines the most.

Notice: some of these pros/cons in and of themselves are not unique to Go, but the combination with others is what sets Go, as a whole package, apart from other languages.

Pros:

  • Easy to learn. Go has a small learning surface area, thus not as a steep learning curve as other languages.
  • Productive language. Allows you to Get Shit DoneTM with little to no ceremony.
  • Safe language. No manual memory management.
  • Fast language. Micro-benchmarks show that it does not trail far behind C/C++.
  • First-class concurrency primitives. Concurrency is well-designed and built-in, not a library/module.
  • Fast build times.
  • Easy deployments. Compile to your target OS and arch and Just Ship ItTM.
  • Tooling, ecosystem, and libraries around Go are mature, stable, and generally high quality.
  • Because of the above perks, many are predicting it will be the go-to language for cloud-native projects, due to its lower barrier-to-entry and easier scaling efforts across massive distributed systems.

Cons:

  • The Go team resisted including package management in the language around v1.0, claiming that it was a community problem, not a language problem, and the community needed to solve it. Well, this led to at least 15 package management tools with different specs. The Go team has realized the need for this and are actively working on adding official package management support in the next minor version or two. It's in beta in the current version 1.11
  • No generics. Depending on who you talk to, some may agree that it's a negative, others may shrug their shoulders in indifference. I am in the latter camp, but the Go team is also open to some form of generics primitive that fits within the language's design.

There are Go Surveys for 2016 and 2017 that may reveal some additional insights into what the Go community thinks are the pros and cons of the language.

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

oh i thought go was an evolved py, i think that package story showed some different thing

Collapse
 
leob profile image
leob • Edited

I'm in the camp saying that no generics is a huge missed opportunity, especially because it wouldn't be that difficult to add and IMO doesn't make the language that much more complicated to learn (hardly, I would say). No generics means we're still coding old-fashioned "for" loops all the time, instead of using the powerful data manipulation abstractions (map, filter, reduce etc) which virtually every other modern language offers. Go is nice, but give us generics and it will be a dozen times nicer!