Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
Domain Nodelet?
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 chanting in the Monastery: (2)
As of 2023-03-26 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?