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]

Reply via email to