# Re: Multidimensional argument list binding (*@;foo)

```Hi,

Luke Palmer wrote:
> On 11/21/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote:
>> Hm. How is (*@;AoA) different from (Array [EMAIL PROTECTED]) then? (Assuming
>> that
>> foo(@a; @b) desugars to foo([EMAIL PROTECTED], [EMAIL PROTECTED]).)
>
> Well, it's not at all, under that assumption.  But that assumption is
> wrong.```
```
Aha! FYI, I got that interpretation from r6628 of S09 [1]:
> The following two constructs are structurally indistinguishable:
>
>     (0..10; 1,2,4; 3)
>     ([0..10], [1,2,3,4], [3])

> I think foo(@a; @b) doesn't have a sugar-free form (that is to
> say, it is the sugar-free form).  Among things that desugar to it:
>
>     @a ==> foo() <== @b
>     foo(@a) <== @b
>     @a ==> @b ==> foo()   # maybe; don't remember
>
> To illustrate:
>
>     sub foo ([EMAIL PROTECTED]) {
>         say [EMAIL PROTECTED];
>     }
>     sub bar (*@;a) {
>         say +@;a;
>     }
>     foo(1,2,3; 4,5,6);   # 6
>     bar(1,2,3; 4,5,6);   # 2
>
> That is, the regular [EMAIL PROTECTED] has "concat" semantics.  However, I'd
> like to
> argue that it should have "die" semantics, for obvious reasons.

Just to clarify -- only ";" with "*@;a" should have "die" semantics, ","
with "*@;a" should continue to work, right? (If so, I agree.)

Could you provide some more examples with ;, please? In particular, what
are the results of the following expressions?

(42; 23)
(@a; @b)
(@a; @b)[0]
(@a; @b)[0][0]

((42;23); (17;19))
((@a;@b); (@c;@d))

*(42; 23)
*(@a; @b)

( (42; 23), 19)
(*(42; 23), 19)

[42; 23]
[EMAIL PROTECTED]; @b]

Thanks very much,

--Ingo

[1] http://svn.perl.org/perl6/doc/trunk/design/syn/S09.pod
/The semicolon operator

```
• Re: Multidimensional argument list binding (*@;foo) Ingo Blechschmidt