Mitigating the issue of name hiding.
缓解名称隐藏问题。
Note: 3.5 discusses linkage issues. The notions of scope, point of declaration and name hiding are discussed in 3.3.
注:3.5 讨论连接性的问题。作用域,声明点和名字隐藏的概念在3.3 中讨论。
Although you should avoid name hiding (giving local variables the same names as attributes), the use of accessors to always access attributes means you can give local variables any name you want.
虽然应该避免名称隐藏(为本地变量赋予与属性相同的名称),但是始终使用读写方法来访问属性意味着:可以为本地变量赋予任何名称。
And Peter Gray in his psychology textbook refers to it as the "changing hiding places" problem, which is probably a better name for it.
彼得·格雷在他的心理学教科书中,将这一任务称为"变换藏身地"问题,这可能是个更为恰当的名字
应用推荐