Tomasz Nurkiewicz: Scala traits implementation and interoperability. Part I: Basics
Traits in Scala are similar to interfaces, but much more powerful. They allow implementations of some of the methods, fields, stacking, etc. But have you ever wondered how they are implemented on top of JVM? How it is possible to extend multiple traits, and where the implementations go to? In this article, based on my StackOverflow answer, I will give several trait examples and explain how scala implements them, what are the drawbacks and what you get for free...