4 Matching Annotations
  1. Aug 2023
  2. Dec 2022
  3. Mar 2018
    1. Mixin’ traits ‘statically’

      静态的 mixin a trait 是说:这个 trait 的成员(method, field) 可以有一个 default implementation. 这样你 mixin 这个 trait 的时候,可以只提供那些没有 Implementation 的抽象函数。 当然也可以都自己实现一遍。

    2. val singingPerson = new Person with Singerperson.sing

      val singingPerson = new Person with Singer 倒是很像 组合