Go under the hood
Go: Under the Hood

Part II Implementation of Language Features

Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident.
-- Rob Pike, "Notes on Programming in C"

The syntax of a language is written for humans to read, but the data layout behind that syntax is what the machine actually executes. This part presses on exactly that gap: when we write down an interface, a slice, a defer, or a type parameter, what memory representation and execution mechanism do the compiler and runtime really prepare for us. We begin with the type system as the overall skeleton, then descend layer by layer into the internal representation of data structures such as strings, slices, and maps, and on to the control flow of function calls, deferred execution, and panic recovery, the paradigm of treating errors as ordinary values, and how generics are implemented without sacrificing performance. Once we understand these implementations, language features cease to be isolated syntactic sugar and become a set of engineering decisions that interlock with one another, each carrying its own cost.