Aug 29, 2026
Go Type System — Interfaces, Embedding and Generics
Go takes a distinctive approach to polymorphism and code reuse. There are no classes, no inheritance hierarchies, and no explicit implements declarations. Instead, Go provides three orthogonal mechanisms: interfaces for abstraction, embedding for composition, and generics for type-safe parameterization. Each one is simple on its own, and together they cover the same ground that class hierarchies cover in other languages — with less coupling. In this post, we’ll work through all three, starting with how Go interfaces are satisfied implicitly, then moving to struct and interface embedding, and finishing with generic functions and types.