|
|
|
|
|
by saheb37
3781 days ago
|
|
traits in Scala doesn't always have to be in a "is a" relationship. If it makes you understand then think of them as adding behavior/mixins. And about why the syntax confused you, the first "with" trait has to be extended, if it could replace extends with "with" in case of traits then maybe you would have liked it better. |
|
I understand what you wanted to show but your example is really confusing and definitely is not correct.