Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I don't disagree that it can be misread. Anything can be misread. If you are used to mutators that return the object they mutate, then there is nothing confusing about it. If you are not used to that style then it is confusing. That is no different than other styles. With any style different from your own you will have to learn it. Saying that you don't read it correctly because you don't use that style doesn't mean the style is bad.

There are however some reasons that style is bad. Mostly it makes it difficult to catch errors if those methods fail. A simple although not elegant solution to that would be to store an error code or message in the object when an error occurs. I'm not recommending that or this style. I just think a post saying this style is bad should include more critism than "I don't like it." and "it's hard for me to read" (not exact quotes, just the feeling i get.)

If that is not how I should read your argument than I would appreciate a better explanation of why its bad. If not for myself then for others who read this node. Like I said, I don't think this is the best style all around but there are cases where it is usefull.


___________
Eric Hodges

In reply to Re^3: Mutator chaining considered harmful by eric256
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 chilling in the Monastery: (5)
As of 2024-03-28 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found