Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re(3): Plural variable naming (or not?)

by FoxtrotUniform (Prior)
on Mar 21, 2002 at 20:34 UTC ( #153412=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Plural variable naming (or not?)
in thread Plural variable naming (or not?)

Interesting... I'd have thought that @plural would be more intuitive than @singular_list. Obviously, your mileage varies.

The one place I can see where this would be a distinct advantage is when you're using Perl arrays as different data types. For instance:

my @foo_list; my @bar_stack; my @baz_queue; my @xyzzy_heap;

If these were just plurals, it would be impossible to tell just from the names which one was a stack, or a queue, or whatever -- which could be a very bad thing.

--
:wq


Comment on Re(3): Plural variable naming (or not?)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153412]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-29 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls