Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
At first, I was obdurately convinced that this is the only "correct" way to think of array naming. The author's rep may have influenced my conviction slightly ;) But on the drive home tonight it suddenly dawned on me that there really is something to what princepawn is saying, something I couldn't see or understand at first. Consider:
a murder of crows
a surfeit of skunks
a bag of potatoes
You wouldn't pluralize 'murder' or 'surfeit' if you were referring to just one collective of crows or skunks. Stated another way and to further explain what I think princepawn means is 'it's the potatoes that gets the plural 's' not the thing holding them.' It's sort of a reverse synecdoche that leads us to pluralize the array name.

Funny how I feel no compulsion to pluralize the array name when I actually use the word 'array' in it:

@myArray = qw(crow skunk soldier); @codeArray = (&get_code(3,500)); my @bigAssArray = qw(donkey mule burro);
That said, I personally cannot shake the readability of using pluralized array names and will most likely continue to do so unless, of course, I'm using some crazy English to C translator that can't distinguish what I mean from what I say ;)

In reply to Re: "Redundant" ne "Bad" by earthboundmisfit
in thread the "@" indicates plural hence "s" is redundant by princepawn

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 cooling their heels in the Monastery: (4)
As of 2024-04-25 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found