Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://48183]
help
Chatterbox?
[shmem]: but that would mean, also, to drop the "use" not allowed in expression abomination, and make use actually return something useful (as does require at the first call, accidentally)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-11-21 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (306 votes). Check out past polls.

    Notices?