What Go is
Go (also called Golang) is a statically typed, compiled, garbage-collected programming language designed at Google in 2007 and released as open source in 2009. It was created by Robert Griesemer, Rob Pike and Ken Thompson with three explicit goals:
- Fast compilation — the language is small enough that even huge codebases compile in seconds, which keeps the edit-build-test loop tight.
- Simple, productive syntax — a small specification (the entire language spec fits in a short PDF), few "magic" features, one obvious way to do most things.
- Built-in concurrency — first-class support for lightweight goroutines and channels following the Communicating Sequential Processes (CSP) model.
What Go is good at
- Network services — HTTP/gRPC servers, proxies, load balancers. (Docker, Kubernetes, Caddy, Traefik, CockroachDB, InfluxDB are written in Go.)
- Command-line tools — single static binary, easy cross-compilation.
- Cloud / infrastructure / DevOps tooling — Terraform, Helm, Hugo, etcd.
- Data plumbing and ETL workers — concurrency makes pipelines natural.
- Game servers, chat servers, real-time systems — goroutines scale to hundreds of thousands of connections per process.
What Go is not primarily aimed at
- Numerical/scientific computing (use Python/Julia/Fortran).
- Heavy GUI desktop apps (some libraries exist, but it is not the sweet spot).
- Hard real-time embedded code where GC pauses are unacceptable.
- Pure systems programming where you need manual memory management (Rust or C/C++ are better fits).
Comparison with neighbouring languages
| Aspect | Go | Python | Java | Rust | C/C++ |
|---|---|---|---|---|---|
| Typing | Static, inferred | Dynamic | Static, verbose | Static, very strong | Static, weak |
| Memory | Garbage collected | Garbage collected | Garbage collected | Ownership / no GC | Manual |
| Compilation | Single static binary, very fast | Interpreted | JVM bytecode | Native, slow compiles | Native |
| Concurrency | Goroutines + channels (CSP) | asyncio / GIL | Threads, virtual threads | async/await + threads | Threads, manual sync |
| Generics | Yes (1.18+) | Duck typing | Yes (erased) | Yes (monomorphized) | Templates |
| Learning curve | Low | Low | Medium | High | Medium-high |
| Typical deploy | Drop one binary on the host | Need interpreter + deps | Need JVM | Drop one binary | Compile per platform |
Design philosophy you must accept
Go is opinionated. To enjoy it, accept the trade-offs:
- There is one formatter (
gofmt). All Go code looks the same. No bikeshedding. - No exceptions, only multiple return values and explicit
errorchecks. - No inheritance, only struct composition and small interfaces.
- No generics for years (now they exist but the culture is still: only when they pay for themselves).
- Standard library first. The standard library is excellent and most projects depend on very few third-party packages.
- Backwards compatibility is taken extremely seriously. Code written in Go 1.0 (2012) still compiles with the latest Go.
What you'll learn in this course
Part 1 (chapters 2–13) walks through the language end to end with runnable
examples. Part 2 (chapters in part2-dsa/) re-implements the classic data
structures and algorithms in Go: arrays, stacks, queues, sorting, hashing,
heaps, balanced binary trees and graphs. By the end you should be able to
write, test, and maintain idiomatic Go.