So that's the key thing to-- to realize; that what the assignment did was have two separate paths to the same object.
认识到赋值会造成两个独立的绑定到;,同一对象上这件事情很关键,因此我可以通过这一条或者。
OK, now that I've got that, we could think about what would I want to do with these points?
我也可以像以前那样,对它们进行赋值操作,好,现在我们已经有这些对象了?
Those two equal signs are saying, is this thing equal to, in value, the thing on the other side?
这两个等号意思是,左边的对象,在值上是不是和另外一边的相等?
PROFESSOR 2: I just want to maybe mention that in some of the reading, you'll see terms like object equality and value equality, instead of shallow equality and deep equality.
教授2:我就是想提醒下,大家阅读的时候请注意,你们会看到对象相等和值相等,而不是浅意义相等和深意义相等,教授:好,那么,这个对象。
It says, take this thing on the left and use it as a name to bind to the value on the right.
它意味着,把左边的对象,当做名字绑定到,右边的值上去。
Object versus value equality. Particularly when you use double equals, are you asking whether you've got the same object or the same value?
对象与值相等,特别是当你用==时,你得问问自己对象与值是否匹配?
And for each object in 0, we have a value.
对于每个在0中的对象,来说我们会有一个值。
I'm going to say, gee, p2 is the x value the same in both of them, and if it is, and the y value's the same, then this is the same point, I'm going to return true.
这样的数据对象,我会把它们命名为p1和,我会去查看,看看两个对象中,的x值是不是相同,如果相同的话,就去查看y值是否相同。
应用推荐