"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You missed one giant and important point. If you are familar with the style then its not more difficult to decipher. It is more difficult to decipher, because it's ambiguous. The ambiguity must be resolved somehow. In the first example, you have to follow the chain of methods and know what type of thing they return. In the 2nd example, the variable name and usage is a big clue that helps resolve the ambiguity. My point all along has been that it is only hard to read if you aren't used to the style. It's not more difficult to read, it's more difficult to understand. Frankly, I' amused you think that's condescending I say your view is condescending, because rather than accept the fact that someone understands a concept that they don't like, you instead decided they must not understand it fully. Understanding how method chaining works is easy. Reading code that uses method chaining is not any more difficult than other types of operator or function chaining. The difficulty comes in when you don't know whether a method is returning the object it's working on, or a sub object. In reply to Re^6: Mutator chaining considered harmful
by revdiablo
|
|