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:我就是想提醒下,大家阅读的时候请注意,你们会看到对象相等和值相等,而不是浅意义相等和深意义相等,教授:好,那么,这个对象。
Some people like to use shallow and deep, object and value, but they're talking about the same thing, which is it the same object or is it the same, in this case, set of values, depending on what you want to define as you use it.
有些人喜欢用对象相等值相等,但是它们是同一件东西,也就是是不是同一个对象,或者是不是同样的,在这个例子中,是同样的值集合,这取决于当你使用它的时候,想要怎么来定义它。
Right, OK. So what I do to open the book is to ask the reader to image that they walking past a shallow pond, maybe somewhere in the park or or university campus.
好的,我在这本书的开篇,请读者想象这样一个画面,你走过,一个浅浅的池塘,可能是公园里,或是大学校园里。
So, for instance, if you take a glass of water and you pour it into another glass that's shallow or tall, it won't change the amount of water you have.
比如说,你有一杯水,将水倒进另一个更浅或者更深的杯子里,含水量并未发生任何改变
So what's going on in this case is, I want to distinguish between shallow equality and deep equality.
第一件事情就是,测试浅意义上的相等,这什么意思呢,这是个不太好的英语句子。
A particular instance of that is deep versus shallow copy.
一个很好的例子就是深复制和浅复制,当你想要复制一个链表的时候。
The first thing is testing shallow equality.
但是这是什么意思呢?
应用推荐