Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Favorite Descriptive Variable Name

by jplindstrom (Monsignor)
on Dec 24, 2000 at 03:56 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found