who would win: The Law of Demeter vs. actually Demeter
-
-
-
i don't know what this is or means
-
my opinion swings back wildly between this being a piece of crap busywork generator and Good Actually, i think there's some boundary to do with how much of a Thing the composed entity is
-
if you're trying to do traditional OOP it's "good, actually". if you're using a different paradigm it's only piece-wise good. separate discussion entirely as to when and where OOP is a good choice (spoiler: much less often than OOP is used in practice).
-
tbh i have no idea whether i'm doing trad OOP or some freakish variant at this point but coming it at it from a real object-level POV it's hard to see what having to build the glue to call car.getWindshieldThickness() instead of just doing car.windshield.getThickness() buys me
-
but i know there are cases where i felt like that glue was definitely the best thing; apparently they're a little more esoteric because i can't produce one on demand) so i'm left feeling like it's the usual "overstate the applicability of a rule to try to get ppl to do it at all"
-
maybe you're misunderstanding it? this is Law of Demeter compliant implementationpic.twitter.com/XRVAZwlrA5
- 9 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.