Description
Embedding is Gos answer to subclasses. There’s one caveat:
There’s an important way in which embedding differs from subclassing. When we embed a type, the methods of that type become methods of the outer type, but when they are invoked the receiver of the method is the inner type, not the outer one.
Interfaces
ReadWriter
“extends” Reader
& Writer
in the example above.