Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Favorite Descriptive Variable Name

by extremely (Priest)
on Dec 21, 2000 at 23:55 UTC ( #47881=note: print w/replies, xml ) Need Help??


in reply to Favorite Descriptive Variable Name

I guess I'm just a lazy slug. I usually go with $a, $b, $c, etc. Years of schooling in Basic, Fortran and C taught me that for loops always need to be $i, $j, $k and that if you need more than four levels of loop you should start over...

Of course, in perl that bites me on the ass at "m" or "s" or "x" or "y".

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: Re: Favorite Descriptive Variable Name
by Adam (Vicar) on Dec 22, 2000 at 00:40 UTC
    $a and $b might also bite you, considering they are magic global variables used by sort.
Re: Re: Favorite Descriptive Variable Name
by chipmunk (Parson) on Dec 22, 2000 at 00:00 UTC
    I can understand "m", "s", "x", and "y" causing problems as subroutine names, which will conflict with the operators of the same names, but why would they be a problem as variable names?
      Basically because I DO use them for subs and filehandles etc etc... =)

      --
      $you = new YOU;
      honk() if $you->love(perl)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://47881]
help
Chatterbox?
Eily can't approve this node
[Eily]: it stays unapproved after I try to moderate it I mean
[chacham]: I'm sure this is old, but i just came across it: If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2018-04-23 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?