John Porter wrote:
> 
> David L. Nicol wrote:
> >
> >
> > How about ALLOWING bareword everything-else?  Start having
> > filehandles work the way everyone expects them to at first,
> > passing as arguments and so forth, without any special treatment?
> 
> How about barewords are always interpreted as function names (by default);
> and the traditional barewords (STDOUT, etc.) are defined as functions
> which return filehandles (like a thunk, eh?).


I see barewords as being whatever the programmer wants them to be,
as long as he makes it clear what he expects the word to be before using
it.

So, C<open> becomes a legacy constructor and the perl6 version of it would
be something like

        
        my filehandle fh; fh->new(">>/tmp/appendablelog");

with or without fh being syntactically singular, fh will from here to the
end of the enclosing block be seen as a filehandle if that makes sense in context.

If it doesn't make sense, meanings from other contexts will be attempted before
autovivification or error.



-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
       perl -e'@w=<>;for(;;){sleep print[rand@w]}' /usr/dict/words

Reply via email to