Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153412]
help
Chatterbox?
[robby_dobby]: marto: Ldn, right now
[marto]: icy here today, snow on the hills
[Corion]: Oh yes, Friday!
[Corion]: Last day at $work before 3 weeks of vacation (well, not that I'd be really travelling, but no-work-time ;) )
[robby_dobby]: marto: yeah, I'd eventually visit Glasgow some day - just to visit the home town of GHC :-)
[robby_dobby]: Corion: Oh, that's awesome! Your timing is perfect enough to see all hell break loose when you get back at work :P
[marto]: well, let me know in advance, I'll buy you a pint :)
[Corion]: robby_dobby: No, I'm returning in the second workweek of January. The main hectic parts are in the first days after the start of the new year
[robby_dobby]: marto: and, I'm not sure I'd be around here long enough for YAPC::EU
[marto]: Corion nice, what are you plans for Christmas?

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-12-15 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?