On Mon, Aug 22, 2005 at 06:05:06PM +0800, Yiyi Hu wrote: : svnbot6 r6401 | iblech++ | *%slurpy_hashes exist :) : svnbot6 r6401 | iblech++ | It uses the semantics of : svnbot6 r6401 | iblech++ | : http://www.nntp.perl.org/group/perl.perl6.language/22860, i.e. : svnbot6 r6401 | iblech++ | sub foo (*%hash) {...}, foo(hash => : {...}); # works : svnbot6 r6401 | iblech++ | sub foo (*%hash) {...}, foo(hash => : {...}, foo => bar); # dies : : : in S06 : List parameters section : sub duplicate($n, *%flag, [EMAIL PROTECTED]) {...} : duplicate(3, reverse => 1, collate => 0, 2, 3, 5, 7, 11, 14); : duplicate(3, :reverse, :collate(0), 2, 3, 5, 7, 11, 14); # same : : Should the example changed to? : sub duplicate($n, *%flag, [EMAIL PROTECTED]) {...} : duplicate(3, flag => { reverse => 1, collate => 0 }, 2, 3, 5, 7, 11, 14); : duplicate(3, flag => { :reverse, :collate(0) }, 2, 3, 5, 7, 11, 14); # same : : duplicate(3, flag => { reverse => 1 }, collate => 0, 2, 3, 5, 7, 11, : 14); #error : duplicate(3, flag => { :reverse }, :collate(0), 2, 3, 5, 7, 11 ); # error. : : : Otherwise, I might confuse many newbie just like I do.
I think the simplest thing is to say that you can't bind to the name of the slurpy hash. You give a name to it so that you can refer to it inside, but that name is not visible to binding. (We could probably say the same thing for other slurpy types, I suspect--especially if it would simplify the binding code.) Larry