Timeline for Is code like this a "train wreck" (in violation of Law of Demeter)?
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 13, 2015 at 3:35 | comment | added | Loren Pechtel | I don't think the Law of Dementer should even apply in a case like this--configuration is basically a container. In every API I have ever worked with looking inside containers is normal and expected behavior. | |
| Sep 21, 2011 at 14:14 | comment | added | user | Since this.configuration is an instance variable of a type of a known interface, calling a method on it that is defined by that interface seems fine even according to a strict interpretation. Yes, I know that it's a guideline, just like KISS, SOLID, YAGNI and so on. There are very few if indeed any "laws" (in the legal sense) in general software development. | |
| Sep 21, 2011 at 14:10 | history | answered | Trasplazio Garzuglio | CC BY-SA 3.0 |