The Law of Demeter for Functions

i think it's very useful when you design a function.it can minimize coupling between modules.

The Law of Demeter for applications states that any method of an object should call only methods belonging to itself,any parameters that were passed in to the method,any objects it created,any directly held component objects.

你可能感兴趣的:(functions)