Scala

Scala: Traits and Self Types

Use Self Types to let traits interact with the objects you are mixing them in to.

Read

Scala: Type Safe Duck Typing

If it walks like a duck and quacks like a duck, I would call it a duck.

Read