On Tue, Aug 08, 2000 at 02:16:57PM -0400, Ted Ashton wrote:
> I, for one, would like to know where the assumption came from that there would
> be no default filehandle.
I believe Larry said he was probably going to axe it.
> Is it necessary that instead of typing
>
> print 'Hello World.';
>
> we need now type
>
> $STDOUT->print('Hello World.');
>
> Is that not going the wrong direction?
Indeed it is. However, print() could be prototyped to take an
optional first argument that has a default value of $STDOUT (or
whatever we call it) Getting rid of default filehandles will make
this not work:
select($STDERR); # Perl 6 Error
print "Oops!"; # Always goes to STDOUT
but that can always be replaced with
print $STDERR "Oops!";
or even
local $STDOUT = $STDERR;
print "Oops!";
programmatically.
Of course we could define chomp() to have an optional first argument
that is the filehandle to do the chomping on too. These sorts of
decisions will have to be made on a per-subroutine basis rather than
having some global $/ that affects many different subroutines.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
- Re: RFC 58 (v1) C<chomp()> changes. Johan Vromans
- Re: RFC 58 (v1) C<chomp()> changes. Dan Sugalski
- Re: RFC 58 (v1) C<chomp()> changes. Dan Sugalski
- Re: RFC 58 (v1) C<chomp()> changes. Graham Barr
- Re: RFC 58 (v1) C<chomp()> changes. Uri Guttman
- Re: RFC 58 (v1) C<chomp()> changes. Jonathan Scott Duff
- Re: RFC 58 (v1) C<chomp()> changes. Ted Ashton
- Re: RFC 58 (v1) C<chomp()> changes. Uri Guttman
- Re: RFC 58 (v1) C<chomp()> changes. Chaim Frenkel
- Re: RFC 58 (v1) C<chomp()> changes. Ted Ashton
- Re: RFC 58 (v1) C<chomp()> changes. Jonathan Scott Duff
- Re: RFC 58 (v1) C<chomp()> changes. Bart Lateur
- Re: RFC 58 (v1) C<chomp()> changes. Mike Pastore
- Re: RFC 58 (v1) C<chomp()> changes. Michael Mathews
- Re: RFC 58 (v1) C<chomp()> changes. Bart Lateur
- Re: RFC 58 (v1) C<chomp()> changes. John Porter
- Re: RFC 58 (v1) C<chomp()> changes. Bart Lateur
- Re: RFC 58 (v1) C<chomp()> changes. John Porter
- Re: RFC 58 (v1) C<chomp()> changes. Bart Lateur
- Re: RFC 58 (v1) C<chomp()> changes. John Porter
- Re: RFC 58 (v1) C<chomp()> changes. Nathan Torkington
