Composition goes beyond the mechanics of type embedding. It's a design pattern we can leverage in Go to build larger programs from smaller parts. These smaller parts come from the declaration and implementation of types that have a single focus. Programs that are architected with composition in mind have a better chance to grow and adapt to changes.
- Declare types and behavior with composition in mind.
- Composition is like building software with lego blocks.
- This is much more than the mechanics of type embedding.
http://golang.org/doc/effective_go.html#embedding
Composition I (Game) | (Example)