DEV Community

Discussion on: Demeter’s Law: Don’t talk to strangers!

Collapse
 
mariotk profile image
MarioTK • Edited

Dear Dr.Caballero,

I'm sorry to disturb you. I'm a computer science student

Demeter's law should simplify the dependency graph, reducing the overall coupling. The objective of this law is to improve encapsulation.

An object of class B (status information of A) should not return to A an object of class C (status information of B).

Right?

Thank you