On Thu, Aug 17, 2000 at 10:48:25PM -0500, David L. Nicol wrote:
> Lets use hats again then.
> 
>       %ws{
>               print ^$height; #prints $ws{height}
>               print $height;  # perl5 visibility rules
>       };

But no $ for the keys of %ws.

        %ws {
            print ^height;      # prints $ws{height}
            print $height;      # prints $height
        }

Something else to consider is that with some of the other proposed
features in perl 6, we could probably implement this functionality in
Perl.  Do we want to make it part of the core or in a library?

BTW, if we define C<with> to map keys of a hash to named place holders
in a curried expression, this might be a good thing:

        with %person {
            print "Howdy, ", ^firstname, " ", ^lastname;
        }

        # becomes
        sub {
            print "Howdy, ", $person{$_[0]}, " ", $person{$_[1]};
        }->('firstname', 'lastname');

        # becomes
        print "Howdy, ", $person{'firstname'}, " ", $person{'lastname'};

(If that's what people meant, I didn't see anyone actually say it).

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to