Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Favorite Descriptive Variable Name

by jplindstrom (Monsignor)
on Dec 24, 2000 at 03:56 UTC ( #48183=note: print w/ replies, xml ) Need Help??


in reply to Re: Favorite Descriptive Variable Name
in thread Favorite Descriptive Variable Name

I use that all the time. Always.

My naming convention goes like this.

  • @aLine = array
  • $paName = pointer/reference to array
  • %hCountry = hash
  • $phLanguage = pointer/reference to hash
  • $objLog = reference to object

The only really bad thing about this is the pointer/reference mixup, since there really are no actual pointers in Perl. This is a Bad Thing, but I'm reluctant to change on account of too much legacy code. I really should take some time and fix that though.

Now, the good thing with using this naming convention everywhere is primarily that all parameters to subs are implicitly documented when it comes to type. I find that very useful.

/J


Comment on Re: Favorite Descriptive Variable Name

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-10-02 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (61 votes), past polls