4 ms·
Ah, but I think OP is a pretty good explanation of _why_ the Law of Demeter is actually good, although it doesn't use that phrase. I've been somewhat suspiciou
by jrochkind1 13y ago
Ah, but I think OP is a pretty good explanation of _why_ the Law of Demeter is actually good, although it doesn't use that phrase.
I've been somewhat suspicious of the law of demeter (not firmly on one side or the other), but this article actually helped me see the value of it.
It's not that "you can't do this because it violates the law of demeter." That's a ridiculous cargo cult way to use software design principles (which, yeah, is quite common). Rather, it's, the law of demeter is good because it prevents THIS stuff, which you don't want.
Like, okay, DHH thinks the law of demeter is useless, but he hates things that... the law of demeter is meant to and helps prevent.
- steveklabnik 13y agoI agree with you that the post is a great explanation of why Demeter is good. All I mean to say is "this is just Demeter" is not a refutation of "I think the Law of Demeter is shit and never follow it." (See my links in your sibling, that's a quote.)