What is the standard idiom for implementing equals and hashCode in Scala?

后端 未结 3 2000
情书的邮戳
情书的邮戳 2020-12-14 16:13

What is the standard idiom for implementing the equals and hashCode methods in Scala?

I know the preferred approach is discussed in Pr

3条回答
  •  情深已故
    2020-12-14 16:43

    There's a free 1st edition of PinS that discuss this subject just as well. However, I think the best source is this article by Odersky discussing equality in Java. The discussion in PinS is, iirc, an abbreviated version of this article.

提交回复
热议问题