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

=head1 TITLE

STDIN, STDOUT, and STDERR should be renamed

=head1 VERSION

  Maintainer: Nathan Wiger <[EMAIL PROTECTED]>
  Date: 04 Aug 2000
  Version: 1
  Mailing List: [EMAIL PROTECTED]
  Number: 30

=head1 ABSTRACT

Consensus has been reached that filehandles (currently
barewords) will be renamed to use the leading $ type, to
make them consistent with Perl.

STDIN, STDOUT, and STDERR should follow suit and be renamed
$STDIN, $STDOUT, and $STDERR.

=head1 DESCRIPTION

Currently, filehandles are barewords, such as FILE and
PIPE. However, for Perl 6 these are planned to be renamed
to true "single-whatzitz" types (thanks Tom) and prefixed
with a $. So, the current:

   print FILE "$stuff\n";

Will become something like:

   print $fh "$stuff\n";

STDIN, STDOUT, and STDERR need to follow suit. We should
change 

   print STDERR "$stuff\n";

to:

   print $STDERR "$stuff\n";

This makes them consistent with other Perl variables, such
as @ARGV, %INC, $VERSION, etc, all of which have the correct
distiguishing prefix for their type.

=head1 IMPLEMENTATION

All references to STDIN, STDOUT, and STDERR will have to
be changed.

We may also want to consider making them readonly. Consider
the implications of:

   $STDOUT = $fh;
   print "$stuff\n";

This would potentially have the same effect as current:

   select($fh);
   print "$stuff\n";

Perhaps we want this behavior, it is pretty cool. But maybe
we don't.

=head1 REFERENCES

RFC14, Modify open() and opendir() to return handle objects



Reply via email to