The Law of Demeter (also known as the Principle of Least Knowledge) shows up occasionally in code reviews and discussions of object-oriented programming practices. But what does it actually mean, and why should we use it?
The Law of Demeter (also known as the Principle of Least Knowledge) shows up occasionally in code reviews and discussions of object-oriented programming practices. But what does it actually mean, and why should we use it?