Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
When I first encountered the idea, presented in Conway's Perl Best Practices, that use English be a best practice, I just thought it another of theDamien's attempts to enable novice Perlers. Many of those practices might rankle a more experienced Perler, but I see the sense of them and only fault the idea if it creates a bar to advancing the skill of the crew.

I don't see using a different name for something as a loss or gain of skill. I scarcely ever mentally verbalize $_ and such, so having a precise and formal name in front of me would seem to be an asset.

But the use English practice continued to seem artificial to me and I could not formulate a reason. What made it curious is that I don't use puncish variables much--it was a small issue: why do I resist using English? but it persisted.

I'm pretty comfortable around these: @_, $_, $/, $., $|, $/, $0, $@, and $,. And I think I'd usually recognize: $`, $', $!, $$, $\, and $^O. There will need to be powerful contextual hints for me to know, on sight, most of the others.

Well, I eventually clued to why puncish is beautiful. And it was all about how puncish vars help a coder who is not well versed with them. When I read $LIST_SEPARATOR, I may be confused as to its derivation; perhaps there is some parsing or data packing happening in user code. When I see the equivalent $", I will know that perldoc perlvar has the definition. The beauty of puncish variables is in the ease with which they can be recognized as perlvars. There is an elegance to the namespace. When I do need to know what $< is, I'll know right where to look.

Be well,
rir


In reply to An Apology for Puncish by rir

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 meditating upon the Monastery: (2)
As of 2024-03-19 06:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found