On Fri, 02 Jun 2017 05:26:14 -0700, c...@zoffix.com wrote:
> Some discussion: https://irclog.perlgeek.de/perl6-dev/2017-06-
> 02#i_14675550
> 
> The crux of it is the type of `+@` slurpy changes, depending on the
> input, though on further examinations it seems only Seq is affected:
> 
> m: sub grab(+@a) { dd @a }; grab %(:42a, :72b); grab (1, (2, 3)); grab
> [1, (2, 3)]; grab (1, (2, 3)).Seq
> rakudo-moar 348891: OUTPUT: «[:a(42), :b(72)]␤[1, (2, 3)]␤[1, (2,
> 3)]␤(1, (2, 3))␤»
> 
> In all of the examples above, the `@a` ends up being an Array, except
> for the last case (with Seq input), where it's a List.
> 
> This leads to two issues:
> 1) The inner list of the Seq did not get containerized, so we have
> inconsistencies in how the `+@` slurpy flattens
> 2) The List is immutable, so doing something like `@a[42] = 70` is
> currently never safe with a `+@` slurpy, because
>     for some inputs it might end up being a List.
> 
> Seems like the Seq case needs fixing so it ends up being an Array as
> well.


Closing this in favour of https://github.com/rakudo/rakudo/issues/1355 , which 
points out additional inconsistencies.

Reply via email to