Go (Golang)
A statically typed, compiled language from Google focused on simplicity, fast compilation, and built-in concurrency (goroutines). Used for backend services, CLI tools, and cloud infrastructure (Docker, Kubernetes are written in Go). Simple syntax, fast builds, great for microservices.
Robert Griesemer, Rob Pike, Ken Thompson · Designed Go at Google in 2007
- Backend microservices and APIs.
- CLI tools.
- Cloud infrastructure (Docker, K8s).
- Systems programming needing zero-overhead (use Rust).
- Data science (use Python).
- Frontend (use JS/TS).
Definition
Go is a compiled, statically typed language with garbage collection, goroutines (lightweight threads), and channels for communication. Minimal syntax (no generics until 1.18, no exceptions — uses error returns). Fast compilation to a single binary. go mod manages dependencies.
Why it exists
To provide a simple, fast-compiling language for large-scale backend services, replacing the complexity of C++ and the overhead of JVM languages in Google-scale infrastructure.
How it works
Write .go files. go build compiles to a static binary (no runtime dependencies). goroutines (go func()) run concurrently; channels communicate between them. Interfaces are implicit (structural typing). Error handling via returned error values.
Scaling limits
Simple type system (generics added late). No exceptions (error handling is verbose). GC pauses (low-latency tuning needed). Binary size is larger than Rust.
Cost shape
Free and open source.
Alternatives
- Rust — Safer and faster, but harder to learn.
- Node.js — Same language as frontend, but slower and single-threaded.
Failure modes
- Verbose error handling.
- GC pauses in latency-critical code.
- Lack of generics pre-1.18.