Traits don't support auxiliary constructors, nor do they accept an argument list for the primary constructor, the body of a trait.
Traits不支持辅助构造函数,它们也不支持在主构造函数,trait的主体里的参数列表。
Static methods that merely accept an argument or two, perform a calculation, and return a value based on nothing but those arguments are ideal.
仅接受一两个实参、执行计算,并仅依据那些实参返回值的静态方法是理想的。
应用推荐