Go Go GO

Recently, a friend asked why did we choose google's Go in our R&D lab instead of Python or even Nodejs. In this post, I will outline the motivations behind our decision and maybe help convince others to explore Go by exploring the language features starting with the most appealing ones from developers and business points of views.

Why use Go?

  1. Google released, and open sourced go under the DBS license in 2009.
  2. With 25 keywords, Go is a straightforward language to learn and be productive in a very short time. It is the only language that I know of that you can learn by writing go on phones and tablets (check out https://play.google.com/store/apps/details?id=com.termux)
  3. Concurrency is built into the language. goroutines are cheap and efficient in their utilization of the stack; they will grow the required stack when the application needs it. Go's concurrency is built on the Communicating Sequential Processes language.
  4. Go compiled to machine code, no IL, interpreters or virtual environments.
  5. goroutines (see point 2) and OS threads do not have one to one mapping. A single goroutine can run on multiple threads. Goroutines are multiplexed into a small number of OS threads.
  6. Go compiles to a single executable for very easy deployments, supports static linking so you can distribute one binary, all the libraries you need, and all of your compiled code, and it is strongly statically typed with a compiler that flags many classes of error.
  7. Go promotes composition over inheritance; structs and interfaces replace classes in the language.
  8. No dead code, the compiler will fail to build your code if it contains unused variables. The compiler will make you honest.
  9. Ryan Dahl, the creator of Nodejs, recommended using go instead of Nodejs(https://www.mappingthejourney.com/single-post/2017/08/31/episode-8-interview-with-ryan-dahl-creator-of-nodejs/).
  10. Google has done a fantastic job documenting the language (https://golang.org/doc/)

Who uses go?

Docker & kubernetes, Twitter, Netflix and of course google.

Go learning resources:

  1. Documentations- https://golang.org/doc/
  2. Playground - Browser based playground where you can share your code with others to review or learn from https://play.golang.org/
  3. Books:
  4. Videos:

I hope I have given you a reason to try get up and Go :-) (cheezy eh?)

Comments are closed