On Sun Mar 01 15:24:23 2015, Mouq wrote: > Actually, it's qqww{} and << >> that are supposed to be equivalent. > And they are when it comes to capture context: > > $ perl6 -e'my $a = 42; say <<$a b c>>;' > 42bc > $ perl6 -e'my $a = 42; say qqww{$a b c};' > 42bc > $ perl6 -e'my $a = 42; say qqw{$a b c};' > 42 b c > > It's less misleading to say that qqww{} and qqw{} don't flatten the > same. > > On Thu Feb 12 04:25:15 2015, pcoch wrote: > > It seems that although qqw{} and << >> are equivalent > > > > my $a = 42; > > <<$a b c>>.perl; # ("42", "b", "c") > > qqw{$a b c}.perl; # ("42", "b", "c") > > > > they don't always behave the same. For instance: > > > > my $a = 42; say <<$a b c>>; # 42bc > > my $a = 42; say qqw{$a b c}; # 42 b c > > > > moritz++ used this on IRC: > > sub f(*@a) { say @a.elems }; my $a = 42; f «$a b c»; f qqw{$a b c} > > OUTPUT«33» > > > > multi f(*@a) { say @a.elems }; multi f($one) { say 'one'}; f «b c»; f > > qqw{b c} > > OUTPUT«2one» > > > > and showed that the quoting constructs differ when there is a single- > > element multi candidate available. > > > > One would expect that these two constructs should behave in the same > > manner.
Current situation: 15:20 < jnthn> m: my $a = 42; say <<$a b c>>; 15:20 <+camelia> rakudo-moar 7c6a55: OUTPUT«(42 b c)» 15:21 < jnthn> m: my $a = 42; say qqww{$a b c}; 15:21 <+camelia> rakudo-moar 7c6a55: OUTPUT«(42 b c)» 15:21 < jnthn> m: my $a = 42; say qqw{$a b c}; 15:21 <+camelia> rakudo-moar 7c6a55: OUTPUT«[42 b c]» 15:21 < jnthn> m: my $a = 42; say .WHAT for <<$a b c>>, qqww{$a b c}, qqw{$a b c} 15:21 <+camelia> rakudo-moar 7c6a55: OUTPUT«(List)(List)(Array)» 15:22 < jnthn> [Coke]: Bit dubious that the last one is Array, not List too 15:22 < [Coke]> I'll add that to the ticket. Thanks. -- Will "Coke" Coleda