Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Favorite Descriptive Variable Name

by fraktalisman (Hermit)
on Dec 29, 2000 at 17:07 UTC ( [id://48803]=note: print w/replies, xml ) Need Help??

in reply to Favorite Descriptive Variable Name

Sometimes late traces of Commodore Basic can be found in my code: $a $b $c etc. $a is most possibly some kind of input, $i a loop iterator, and $x $y some coordinates. Words like $name or $count are not that much better. The worst thing is when you re-use code for another purpose, and the variable names don't match their content anymore.

Replies are listed 'Best First'.
Re: Re: Favorite Descriptive Variable Name
by tilly (Archbishop) on Dec 29, 2000 at 17:52 UTC
    Avoid $a and $b. Avoid in particular declaring them with my.

    The reason is that they are special to sort, and therefore special to warnings and strict.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-06-22 06:09 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.