On 10 Aug 2000 22:21:37 -0000, Perl6 RFC Librarian wrote:

>Replace => (stringifying comma) with => (pair constructor)

>This RFC proposes the introduction of a new data type -- the I<pair> -- and
>the co-opting of the => operator to act as a pair constructor. Most existing
>uses of => would be preserved.

I kinda like it. It's... intuitive. It makes named sub arguments rather
straightforward, apart from that prefix thing.

Should (name => 'Bart') really stuff 'Bart' into a lexical variable
$name? That's... odd. I see no connection between 'name' and '$name',
but I'm trying really hard to ignore any similarities. Well, I do think
that

        use vars '$foo';

is butt ugly.


You have overlooked one reference: RFC 21, "Replace C<wantarray> with a
generic C<want> function", by... you. :-) I understand that a pair would
behave differently in array context (may I call it that?) than in a hash
context.

What about the current habit of passing arguments using the "-bareword
=> $value" syntax, to unprototyped subs? Is this an array or a hash
context? Or does it not matter? In case you're wondering, I am thinking
about backward compatibility of current modules on CPAN that use this
syntax, whether these would still work under Perl6, or whether they'd
need a rewrite. (ugh!)

-- 
        Bart.

Reply via email to