Definition

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

1 comment

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?
Cancel

-ADS BY GOOGLE

File Extensions and File Formats

SearchDataCenter

SearchAWS

SearchServerVirtualization

SearchCloudApplications

TheServerSide.com

SearchCloudComputing

DevOpsAgenda

Close