Go 1.0: Google's language for concurrency and network services

Go 1.0 introduces a compiled language with garbage collection, goroutines for concurrency, fast compilation and static binaries, designed by Google for large-scale network services.

Open SourceWeb Open SourceGoGolangConcurrencyBackendGoogle

A language born from frustration

Go is born from the daily frustration of three Google engineers — Robert Griesemer, Rob Pike and Ken Thompson — facing the compilation times of the C++ code that powers the company’s infrastructure. Compilations that take minutes, dependencies that propagate in chains, a complex type system that slows development: existing languages are not designed for the scale of Google’s codebases and teams. The answer is a new language, deliberately minimal, that prioritises simplicity and compilation speed over syntactic richness.

With the release of version 1.0 in March 2012, Go reaches API stability: code written for Go 1.0 will continue to compile and run with subsequent versions, a fundamental guarantee for production adoption.

Compilation and static binaries

Go is a compiled, statically typed language with a built-in garbage collector. Compilation is extremely fast — orders of magnitude faster than C++ — because the dependency system is designed to avoid transitive recompilation. The compiler produces a single static binary that includes all dependencies: no runtime to install, no shared libraries to manage. Deployment reduces to copying an executable file.

The standard library is rich and oriented towards network services: HTTP servers, HTTP clients, JSON handling, cryptography, I/O, string manipulation. Writing a functional web server requires a few lines of code and no external dependencies.

Goroutines and channels

Go’s concurrency model rests on two primitives: goroutines and channels. A goroutine is a function executed concurrently, managed by the Go runtime scheduler rather than the operating system. Creation cost is minimal — a few kilobytes of stack — and a single process can handle hundreds of thousands of active goroutines.

Channels are the communication mechanism between goroutines: typed data structures through which goroutines exchange values safely. The motto is “Don’t communicate by sharing memory; share memory by communicating”: instead of protecting shared data with locks, goroutines coordinate by passing messages.

Simplicity as a design choice

Go has no classes, no inheritance, no exceptions, no generics. These absences are deliberate choices: every feature added is a feature every developer must understand. The result is a language that can be learned in weeks and produces code readable by anyone who knows the fundamentals. For high-concurrency network services, Go offers a rare balance between performance, simplicity and productivity.

Link: golang.org

Need support? Under attack? Service Status
Need support? Under attack? Service Status