Law of Demeter

This post shows a good example of how to refactor your code to preserve Law of Demeter. Very clean and simple example. R# is there for the refactoring part, to make things less manual and friction free. As a reminder, Law of Demeter:

Each unit should have only limited knowledge about other units: only units "closely" related to the current unit. Or: Each unit should only talk to its friends; Don't talk to strangers.

No Comments