Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: camelCase vs snake_case

by johngg (Abbot)
on Aug 29, 2012 at 22:23 UTC ( #990584=note: print w/ replies, xml ) Need Help??


in reply to camelCase vs snake_case

My personal preference is camelCase as I find it easier to read and easier to type. I also find that snake_case is more prone to error (I actually typed snake-case before spotting my mistake) and makes for even longer lines if you use long, descriptive variable names. The only problem using camelCase is if your variable name contains an upper-cased acronym in which situation things can get ugly :-(

Cheers,

JohnGG


Comment on Re: camelCase vs snake_case
Re^2: camelCase vs snake_case
by BrowserUk (Pope) on Aug 29, 2012 at 22:52 UTC
    The only problem using camelCase is if your variable name contains an upper-cased acronym in which situation things can get ugly

    FWIW: I usually find that in that case, start the word after the acronym with a lower case letter -- as with the first word, and things clarify.

    Eg. my $countOfFSBblocks;


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2014-07-12 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls