Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

by nefertari (Chaplain)
on Mar 20, 2002 at 09:51 UTC ( #152944=note: print w/replies, xml ) Need Help??

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

No, you aren't: Some names (i often name variables in german, or mix the languages, this i should change!):
@mathsylist : a name for a list in that i store the recent mathsymbols.
%preprintliste : the matching preprints, stored as a hash, in order to avoid trouble with doubleentries in two files.
@sortierteschluessel: this is plural (sorted keys) for exactly that.
It seems that i either use plural or something like list in the end.
  • Comment on Re: Re: Plural variable naming (or not?)

Replies are listed 'Best First'.
Re(3): Plural variable naming (or not?)
by FoxtrotUniform (Prior) on Mar 21, 2002 at 20:34 UTC

    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.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://152944]
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: (4)
As of 2022-09-29 10:40 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (125 votes). Check out past polls.