↓ Skip to main content

Go: What It Is and Why It's Worth Learning

689 words·4 mins· loading · loading ·
Table of Contents
Learn Golang - This article is part of a series.
Part 1: This Article

Updated 16 Nov 2026: rewritten. The original was a feature list; this version explains the three or four properties that actually matter and corrects the comparison table.

Go is a compiled, statically typed programming language that Google released as open source in 2009. Robert Griesemer, Rob Pike and Ken Thompson designed it to be small enough to learn in a weekend and fast enough to run production servers. Version 1.0 followed in 2012, and the language has changed very little since, which is part of its appeal.

This is the first post in a series that starts from “Hello, world” and finishes with a small web server and a DNS record checker. This post covers what Go is and why it’s worth your time if you work with infrastructure.

Where you’ve already met Go
#

If you work with cloud infrastructure, you probably use Go programs every day without knowing it. Kubernetes, Docker, Terraform, Prometheus, CoreDNS, CockroachDB and Hugo (the tool that builds this site) are all written in Go. The Go wiki keeps a longer list.

That’s not an accident. The language was designed for networked services and command-line tools, and a few of its properties fit that job well.

What makes Go different
#

It compiles to one binary. go build produces a single executable with no interpreter or runtime to install. Copy it to a server and it runs. This is why Go tools are so easy to ship in a container: the image can be nearly empty.

It compiles quickly. Large Go projects build in seconds, which keeps the edit-run loop short.

It’s statically typed. Every variable has a type that’s fixed at compile time. The compiler rejects a program that mixes them up, so a whole class of bugs never reaches production:

Go
var count int = "three" // compile error: cannot use "three" (untyped string constant) as int value in variable declaration

It has a garbage collector. Memory is allocated and freed for you, so there’s no manual free as in C or C++.

Concurrency is built in. A goroutine is a function running concurrently, started with the go keyword and cheap enough to launch thousands of. Channels let goroutines pass values to each other safely. Concurrency isn’t covered in this series, but it’s the reason Go suits network servers.

The standard library is large. HTTP clients and servers, JSON, cryptography, compression and testing all ship with the language, so a lot of real programs need no third-party packages.

Go compared with Python and C++
#

Go Python C++
Typing Static Dynamic Static
Execution Compiled to native code Interpreted Compiled to native code
Compile time Fast None (interpreted) Often slow
Memory Garbage collected Garbage collected Manual
Concurrency Goroutines and channels Threads (limited by the GIL for CPU-bound work), asyncio Threads
Classes and inheritance No classes, no inheritance; types have methods and use interfaces Classes, inheritance Classes, inheritance

Go’s lack of inheritance is deliberate. Instead of building class hierarchies, you attach methods to plain types and describe behaviour with interfaces. The structs, methods and interfaces post covers this.

Static versus dynamic typing
#

In a statically typed language like Go, a variable’s type is fixed when you declare it, and the compiler checks every use. A dynamically typed language like Python decides types while the program runs, so the same variable can hold a number and then a string.

Static typing catches mistakes earlier and gives editors better autocomplete. Dynamic typing is quicker for short scripts. Go tries to keep the safety of static typing without the ceremony: you can write name := "Ada" and the compiler works out that name is a string.

What this series covers
#

The posts build on each other, so reading them in order works best:

  1. This introduction
  2. Your first program: packages, modules and go run
  3. Variables, printing and comments
  4. Data types, escape sequences, scope and constants
  5. Operators and control flow
  6. Arrays, slices and maps
  7. Functions, pointers, structs, methods and interfaces
  8. A web server and a DNS checker

The code for the early posts is in the get-started-with-Go repository. Install Go from go.dev/dl, then continue to the next post.

Learn Golang - This article is part of a series.
Part 1: This Article

Related