what is the difference between a “trait” and a “template trait”?

前端 未结 3 1429
长发绾君心
长发绾君心 2021-01-31 04:42

Looking at the scaladoc for Traversable and TraversableLike, I\'m having a hard time figuring out what the difference between them is (except that one extends the other). The o

3条回答
  •  借酒劲吻你
    2021-01-31 05:20

    The [...]Like classes are implementation classes for the actual collection classes. In a sense they act like template implementations from which most - if not all - behavior is inherited by the actual collection classes.

    For a very detailed and approachable overview read The Architecture of Scala Collections.

提交回复
热议问题