Go (programming language)

Contributor(s): Sarah Lewis

Go (also called GoLang) is an open source, general-purpose programming language developed by Google engineers to create dependable and efficient software. Most similarly modeled after C, Go is statically typed and explicit.

The conventions behind Go use "goroutines," or light-weight processes, that enable concurrent processing and behave like threads. The syntax mimics patterns commonly seen in dynamic languages. Created with simplicity in mind, Golang favors composition interfaces over inheritance. Some of Go's tools worth highlighting are its "Gofmt" feature that automatically formats and indents code for readability," Go run" that compiles and runs code simultaneously, "Go get" that seamlessly integrates with GitHub and "Godoc" that translates code to HTML or plain text.

Due to its ability to support concurrency, Go is best used for the creation of native cloud application (NCA) development, microservices and distributed systems. A few notable companies that have adopted Go are Shopify, Uber, Netflix, Dropbox and Intel.

The creation of Go was motivated by the need to solve software engineering issues at Google and to provide an alternative for C++. Also, as multi-core processors became more popular, developing a language with higher productivity levels was necessary. Some of the problems that Go addresses are slow build time, uncontrolled dependencies, effort duplication, difficulty of writing automatic tools and cross-language development.

Benefits of Go

  • Quick compilation and execution speed
  • No virtual machine (VM) is needed
  • Portability
  • Lightweight goroutines that support concurrency
  • Interfaces enable loosely coupled systems
  • Automatic garbage collection
  • Memory safety
  • Independent error handling
  • Extensive built-in libraries

Drawbacks of Go

  • Does not support generics, or the ability to write abstract, implicit code
  • Lack of runtime safety
  • Enforces strict rules
  • Incompatible with function overloading
  • Not conventionally object-oriented

Go vs Competitors

Golang has comparable features to other programming languages, but provides an overall unique alternative. The main design goal of Go is to facilitate fast compilation, unlike some of the other common languages. When compared to C++, Go reduces the amount of runtime errors and dependencies while increasing memory safety. Ruby provides a safer approach, but requires an interpreter and takes longer to compile. Java is another popular programming language, however, it requires a virtual machine in order to run the code. Go eliminates this necessity and also combats the complexity and verbosity of Java code itself.

This was last updated in October 2018

Continue Reading About Go (programming language)

Dig Deeper on Modern IT Operations Skills

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

What do you think are the advantages to learning how to program in Go?
One of the biggest drawback of Go is the unexpected language "features" that will trip up a novice. E.g., who would expect that if you check if something is null and it is, but then do a type assertion on it and it is then not null? How many bugs will that result in? Do a Google search for "Go gotchas" and you will see how horrible Go is for a newbie. Also, try maintaining someone else's Go code: you want to see what type a variable is? Good luck! You first have to see what sets the variable (perhaps in a function return value, so you have to dig up that function), and then see if that object implements all of the methods of the type in question. You'll spend many aggravating hours digging through other people's code just to discover what you would find in ten seconds in Java.


File Extensions and File Formats