Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: the "@" indicates plural hence "s" is redundant

by Molt (Chaplain)
on Oct 30, 2002 at 16:53 UTC ( [id://209143]=note: print w/replies, xml ) Need Help??


in reply to the "@" indicates plural hence "s" is redundant

Personally I tend to add the 's' to make things plural, it means I can just 'Read the words' to turn much of the quickly-reread code into English without needing to play about with learning to read the @ as plural.

I'd say this is also the reason why people tend to use plurals for database tables, despite the fact that it's a table and hence plural.. it's just more natural to write select firstname from users where lastname='Jones' than select firstname from user where lastname='Jones'.

This can kind of mess up when you index admittedly, $users[0] just seems subtly wrong to my brain, with the plural suggesting I'm dealing with more than one user at this time. Generally I tend to end up with things such as foreach my $user (@users) though, which I find perfectly readable.

Guess this is one of those personal taste things. Ultimately it doesn't matter providing you're consistant. These are the things of which coding style guidelines are made.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found