> > So, in this case, a "with" synonym for "for" would work.
> >
> Particularly if '$_' was implied... So with Perl 6's '.' replacing '->',
> and 'with' aliasing 'for':
>
>    with ( $XL.{Application}.{ActiveSheet} ) {
>      .cells(1,1) = "Title";
>      .language() = "English";
>    }

This is my idea for it; .zebra could always be the 'default variables'
attribute 'zebra'.  The With could also make the [variable, alias, whatever]
default, but not replace the $_:

$_ = "monkey ";
$foo = "coward";
with ($foo){
    print;
    print "$_";
}

would output "monkey coward". If this was universal and heirachial, then

$foo.bar.quux = "chainsaw";
with ($foo){
    with (.bar){
        print .quux;
    }
}

Be cool if this could be overloaded (correct word?) to work for functions,
too.

with (print()){
    "foo";
    "monkey";
}

I see a problem with "." being the old way of sticking strings together
though.

(All opinions expressed in this post are probably wrong. Trying to figure
how to post this thing, the newsgroup bit didn't work.)

Reply via email to