Talk:Law of Demeter
This is the talk page for discussing improvements to the Law of Demeter article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Law of Demeter is a former featured article. Please see the links under Article milestones below for its original nomination page (for older articles, check the nomination archive) and why it was removed. | |||||||||||||
| |||||||||||||
Current status: Former featured article |
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Citation 2
[edit]It is not actually a link to any evidience of a disadvantage in terms of preformance, please link to something correct! — Preceding unsigned comment added by 122.106.254.100 (talk) 11:30, 31 March 2012 (UTC)
In object-oriented programming
[edit]The cited reference for the 5 points listed in this section slightly contradicts some of the 5 points. The reference only details 4 points. Point one and point five are not listed in the reference. Point is is the "method" itself, not the object, and point four and one in the article are really the same. The cited reference *never* details global variables. Ritchiep (talk) 19:45, 19 November 2012 (UTC)
Origin of the name
[edit]What does this law have to do with Demeter? -- Smerdis of Tlön 18:08, 8 Apr 2004 (UTC)
(Inserted quote from Wikipedia:Featured article removal candidates/Law of Demeter):
Not voting, just info for Smerdis: it's named for the Demeter Project, during which it was formulated. The Demeter Project was so named because it was trying to develop software methodolgies which "grew" organically, and Demeter is the goddess of agriculture. Securiger 09:19, 12 May 2004 (UTC)
For the curious. Shinobu 18:06, 25 November 2006 (UTC)
I disagree with the origin of the name - I was taught it was based on the Greek myth of Persephone, where Persephone (daughter of Demeter) was abducted by Hades. Thus, using the dark humor found so often in Comp Sci, the LoD boils down to "don't talk to strangers". Perhaps the origin is a bit of both (I would expect people on the Demeter Project to be aware of associated stories). 2603:300B:727:C700:4DD5:2EF0:DDE8:B56C (talk) 20:38, 24 March 2021 (UTC)
What does this mean?
[edit]No further work has been conducted using the Law since 1996. However, it is still taught in less up-to-date computer science curriculums.
What is the intended meaning of these two sentences? Shinobu 18:02, 25 November 2006 (UTC)
- Shinobu, we have to talk. 134.106.199.22 15:07, 12 April 2007 (UTC)
Surely this "law" (I'd call it a principle) is older than 1987? In my opinion, this is what all "good" object-oriented systems strive toward. MagnusW 11:36, 19 June 2007 (UTC)
Disadvantage paragraph
[edit]I find this paragraph in the disadvantages very obscure: "One solution to the problem of enlarged class interfaces is the aspect-oriented approach,[7] where the behavior of the method is specified as an aspect at a high level of abstraction. This is done by having an adaptive method that encapsulates the behaviour of an operation into a place, with which the scattering problem is solved. It also abstracts over the class structure that results in avoiding the tangling problem. The wide interfaces are managed through a language that specifies implementations. Both the traversal strategy and the adaptive visitor use only a minimal set of classes that participate in the operation, and the information about the connections between these classes is abstracted out." What is the "tangling problem" and "scattering problem"? "Traversal strategy" and "adaptive visitor"? This sounds like some kind of enterprise architecture pattern pulled out of its place and put into this article out of context. I think it's great to suggest solutions to software design principles, but something like this seems like it needs its own article, it doesn't make sense here... Davedx (talk) 07:58, 23 January 2018 (UTC)
Off-topic discussion collapsed
|
---|
This paragraph is just plain wrong:
It is indeed a sign of bad OO design and has nothing to do with the Law of Demeter. What is this paragraph talking about? --150.101.156.249 (talk) 04:57, 27 May 2011 (UTC)
The underlying problem is that unfortunately a lot of programmers think they are puppeteers and must move the dog's legs, instead of just asking the dog to walk. So it boils down to a lack of abstraction. Breaking the Law of Demeter is typically a symptom of micromanagement, a mindset that you need to "pull the strings" to make things happen. If you can not get rid of that ill guided mindset, no amount of refactoring and recasting of calls can save you. 188.174.33.85 (talk) 10:34, 18 May 2019 (UTC) |
Note: This is not a forum general discussion of OOP. I have therefore collapsed the discussion about the pros and cons of the law. Please keep the discussion focused on discussing actual improvements to the article. Disadvantages and advantages should come from WP:Reliable sources, not the editor's opinions. --Averell (talk) 06:50, 20 May 2019 (UTC)