![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: Mutator chaining considered harmfulby dragonchild (Archbishop) |
on Dec 29, 2004 at 14:24 UTC ( #417988=note: print w/replies, xml ) | Need Help?? |
In reading a completely unrelated article, I found this snippet:
Interaction-based testers do talk more about avoiding 'train wrecks' - method chains of style of getThis().getThat().getTheOther(). Avoiding method chains is also known as following the Law of Demeter. While method chains are a smell, the opposite problem of middle men objects bloated with forwarding methods is also a smell. (I've always felt I'd be more comfortable with the Law of Demeter if it were called the Suggestion of Demeter.)1 I found it interesting that Fowler links method chaining to users of the state-based testing style. The fact that interaction-based testers view chaining to be a 'train wreck' was also telling. No real point to this ... just found it interesting. :-)
Being right, does not endow the right to be rude; politeness costs nothing.
In Section
Meditations
|
|