(astronomy) 1108 Demeter, a main belt asteroid.
demeter
Definitions, parts of speech, synonyms, and sentence examples for demeter.
Editorial note
I agree with you that the post is a great explanation of why Demeter is good.
Quick take
(astronomy) 1108 Demeter, a main belt asteroid.
Meaning at a glance
The clearest senses and uses of demeter gathered in one view.
(Greek mythology) The goddess of the fertility of the Earth and harvests, protector of marriage and social order; daughter of Cronos and Rhea, mother to Persephone.
Definitions
Core meanings and parts of speech for demeter.
noun
(astronomy) 1108 Demeter, a main belt asteroid.
noun
(Greek mythology) The goddess of the fertility of the Earth and harvests, protector of marriage and social order; daughter of Cronos and Rhea, mother to Persephone.
Example sentences
I agree with you that the post is a great explanation of why Demeter is good.
If you're accessing objects that deeply, something is breaking the Law of Demeter about locality of reference and looseness of coupling.
Like, okay, DHH thinks the law of demeter is useless, but he hates things that...
Same for Myung - he was using a DI box and a Demeter power amp ran on a dummy load for overdrive.
My feeling is that Rule 9 roughly maps to following the Law of Demeter in that you shouldn't chase properties down more than one level, e.g.
Encapsulation / Demeter make it hard to work with data.
DHH has repeatedly asserted that he thinks the Law of Demeter is bad, so that wouldn't work as a justification, at least in response to him.
Learn the Law of Demeter and other principles.
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 was violating the Law of Demeter constantly, reaching through objects to get to other objects, passing internal state around with the express intent of mutation, etc.
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.
When I tried building it in an OO way (in Ruby, but I'd have the same problem in Java), I found myself violating the Law of Demeter and passing internal state around a lot.
Quote examples
In an OO environment, many times you get lost in the "wiring" of the construction, making sure you implement the correct interfaces, paying attention to Demeter's Law and the rest.
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).
And as I've said before: we rank on the first page at Practicing Ruby for the google search term "infrastructure automation", we're on the first page for "actor model", first page for "Law of Demeter", etc.
Proper noun examples
Code that results in mocks returning mocks returning mocks is code that is violating the Law of Demeter.
Citing dhh's opinion is not a justification for ignoring the law of Demeter, either, so what's your point?
For one, it better follows Demeter's Law, as you do not need to expose the getAge property.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use demeter in a sentence?
I agree with you that the post is a great explanation of why Demeter is good.
What does demeter mean?
(astronomy) 1108 Demeter, a main belt asteroid.
What part of speech is demeter?
demeter is commonly used as noun.