Nick

20%
Flag icon
the Law of Demeter2 that says a module should not know about the innards of the objects it manipulates. As we saw in the last section, objects hide their data and expose operations. This means that an object should not expose its internal structure through accessors because to do so is to expose, rather than to hide, its internal structure. More precisely, the Law of Demeter says that a method f of a class C should only call the methods of these: • C • An object created by f • An object passed as an argument to f • An object held in an instance variable of C The method should not invoke ...more
Nick
Worth considering.
The Robert C. Martin Clean Code Collection (Collection) (Robert C. Martin Series)
Rate this book
Clear rating
Open Preview