清单3 . getters和setters的值语义以及引用语义。
Listing 3. Value and reference semantics for getters and setters.
假设您是Widget类的一个使用者,您并不知道存取器具有值语义还是引用语义。
Let's say that as a user of the Widget class, you don't know whether the accessors have value or reference semantics.
建模员不应该假设数据的位置,值访问或者引用语义访问,也不应该假设任何清晰的并发管理设备。
Modelers should make no assumptions about the location of the data, call-by-value, or call-by-reference semantics nor any implicit concurrency management facilities.
应用推荐