This and other RFCs are available on the web at
  http://dev.perl.org/rfc/

=head1 TITLE

Rename @ARGV to @ARGS   

=head1 VERSION

   Maintainer: Nathan Wiger <[EMAIL PROTECTED]>
   Date: 11 Aug 2000
   Version: 1
   Status: Developing
   Mailing List: [EMAIL PROTECTED]
   Number:

94

Perl isn't C. Time to get over it. :-)

=head1 DESCRIPTION

@ARGV is Perl's version of something like C's argv/argc. However, I
would argue its naming is bad, because:

   1. It isn't used like and doesn't behave like C's argv/argc
      in many circumstances

   2. There's no $ARGC to go with it

   3. It's not a word or anything close to a word

   4. Perl isn't C (thank heavens!)

   5. @ARGV makes little sense to people (like me) from a sh/ksh
      background

@ARGS is a better choice for several reasons:

   1. It's closer to a word and so is faster to read [1]

   2. It's easier to explain and remember "Your command-line
      args are contained in @ARGS"

   3. When you say "$var = $ARGS[2]" it's easier to glance
      at and tell what you're getting quickly

   4. It makes it more consistent with other word-like
      Perl vars like $VERSION.

   5. There's no expectation that it works like or should
      be used like C's argv/argc

I don't feel this is changing something just for the sake of changing
something. I think it actually helps clarify a key difference between
Perl and C. However, feel free to disagree with me. Be nice. ;-)

=head1 IMPLEMENTATION

Change @ARGV to @ARGS. Make sure that the translator changes any code
references in a person's script too. Make sure shift works on @ARGS,
etc, etc.

=head1 NOTES

[1] This is true. I did a lot of work in cognition and artifical
intelligence in college. Your brain reads words and legal word-like
constructs about 3 times faster than non-words, even if there's only a
one or two character difference. For example, you'd read "fleggies" much
faster than "fleggitg". Kind of neat, eh?

=head1 REFERENCES


Reply via email to