Value-based Classes confusion

前端 未结 5 1629
鱼传尺愫
鱼传尺愫 2021-02-05 18:52

I\'m seeking some clarification to the definition of Value-based Classes. I can\'t imagine, how is the last bullet point (6) supposed to work together with the first one

5条回答
  •  迷失自我
    2021-02-05 19:41

    Point 6 says if a & b are equal then they can be used interchangeably i.e say if a method expects two instances of Class A and you have created a&b instances then if a & b passes point 6 you may send (a,a) or (b,b) or (a,b) all three will give the same output.

提交回复
热议问题