Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
A lot of the concepts in there like dispatch tables, etc. are more likely to lead to a better program than a crash course on OO will.

I couldn't agree more. (Though with a caveat!)

Dominus covers some really useful techniques in HOP. And does so in a very clear and logical style. He is to be congratulated on the clarity of both his writing style and the way the topics covered, fit to together, and follow on from each other. I hope he made (is making) some money from it. (Directly or indirectly.)

The caveat is to only use those technques where they fit your application's requirements. As with OO, don't try and force-fit your application to the techniques. The downfall of all programming methodologies is when they get adopted wholesale to the exclusion of all else. Some algorithms and requirements are a good fit for OO; other less so. Sometimes FP techniques are the way; other times not. Sometimes, good old-fashioned procedural techniques are all that is required and the clearest solution.

The trick with all these things is to pick the right tool for the particular job, and avoid the 'I have a hammer' scenario.

A secondary caveat of the HOP techniques is to bear in mind the cost of Perl 5 function calls. Whilst the HOP techniques work, and the descriptions are clearer than many other treatments of the material, they do tend to rely upon lots of nested functions calls, each of which that does very little--and that exacts a substantial penalty in Perl 5.

I'd love to see HOP adapted to Perl 6/Parrot, once that pairing starts delivering on its potential. I think that would be something really special.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^3: Are global variables "bad"? by BrowserUk
in thread Are global variables "bad"? by jpearl

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 sharing their wisdom with the Monastery: (2)
As of 2024-04-20 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found