numinous vs olympic abstractionshttps://twitter.com/LTF_01/status/1004061149812404224 …
-
-
Replying to @eigenrobot
who would win: The Law of Demeter vs. actually Demeter
1 reply 0 retweets 2 likes -
-
Replying to @palecur @eigenrobot2 replies 0 retweets 2 likes
-
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
2 replies 0 retweets 1 like -
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).
1 reply 0 retweets 2 likes -
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
2 replies 0 retweets 1 like -
Replying to @chaosprime @danlistensto and
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"
1 reply 0 retweets 1 like -
maybe you're misunderstanding it? this is Law of Demeter compliant implementationpic.twitter.com/XRVAZwlrA5
2 replies 0 retweets 1 like -
Replying to @danlistensto @chaosprime and
if you've got private member vars as a language construct then you need to use the getter. if you don't (Python or JS style) it's your choice but there's essentially nothing to be gained from circumventing the getter anyway.
1 reply 0 retweets 2 likes
privacy isn't really relevant, same considerations apply to car.getWindshield().getThickness()
-
-
you wouldn't have to do this if you just hardcoded thickness as an enum chaos
1 reply 0 retweets 2 likes -
enums? the fuck outta here with this fancified froofaraw, real programmers embed integer literals
0 replies 0 retweets 2 likes
End of conversation
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.