Beefy Boxes and Bandwidth Generously Provided by pair Networks
"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
in thread Mutator chaining considered harmful by Aristotle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-18 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found