Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-22 Thread Leopold Toetsch
On May 22, 2006, at 20:28, Chip Salzenberg wrote: Hmm, seems that another call signature bit is in order then, which "looks" into flattening arrays for multi dispatch purposes. Why not just specify that :flat always expands before MMD dispatch? I don't see much of a use case for the current b

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-22 Thread Chip Salzenberg
On Mon, May 22, 2006 at 12:22:26AM +0200, Leopold Toetsch wrote: > On May 21, 2006, at 23:10, chromatic wrote: > >foo([,] eager @onetothree); # array flattened before &foo > >called > > Hmm, seems that another call signature bit is in order then, which > "looks" into flattening arra

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread chromatic
On Sunday 21 May 2006 15:23, Leopold Toetsch via RT wrote: > Hmm, seems that another call signature bit is in order then, which > "looks" into flattening arrays for multi dispatch purposes. I'm not sure it's just multi-dispatch; it looks like all signature checking. The foo() in the example I q

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread Leopold Toetsch
On May 21, 2006, at 23:10, chromatic wrote: foo([,] eager @onetothree); # array flattened before &foo called Hmm, seems that another call signature bit is in order then, which "looks" into flattening arrays for multi dispatch purposes. leo

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread chromatic
On Sunday 21 May 2006 13:54, Leopold Toetsch wrote: > That's still no sign of providing multi invocants From S06: sub foo($x, $y, $z) {...}# expects three scalars ... To flatten before the list is even passed into the subroutine, use the eager list operator: foo([,] eager @o

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread Leopold Toetsch
On May 21, 2006, at 22:29, Matt Diephouse wrote: foo([,[EMAIL PROTECTED]); # okay: @onetothree flattened to three args In this example, $x, $y, and $z are positional args. I would expect C< foo(1,2,3) > and C< foo([,[EMAIL PROTECTED]) > to be identical calls -- even wrt multi disp

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread chromatic
On Sunday 21 May 2006 13:29, Matt Diephouse wrote: > I think chromatic means that he thought :flat _was_ positional. That's > certainly what I thought. Yes, exactly. I thought :flat and :slurpy were symmetric. > Look at the "Flattening argument lists" > section of S06: > > sub foo($x, $y,

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread Matt Diephouse
Leopold Toetsch <[EMAIL PROTECTED]> wrote: On May 21, 2006, at 19:13, chromatic wrote: > That's unfortunate. I thought :flat was like the splatty behavior in > Perl 6. Reading up and down the S and As, I don't see any indication that Perl6 is using anything other then positional arguments for

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread Leopold Toetsch
On May 21, 2006, at 19:13, chromatic wrote: That's unfortunate. I thought :flat was like the splatty behavior in Perl 6. Reading up and down the S and As, I don't see any indication that Perl6 is using anything other then positional arguments for multi dispatch. leo

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread chromatic
On Sunday 21 May 2006 03:03, Leopold Toetsch via RT wrote: > Invocants are the first few *positional* arguments used for a function > call, but certainly not arguments inside some kind of flattening > container. > > Imagine you have instead of ... > > > 'foo'( args :flat ) > > end > > .end

Re: [perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-21 Thread Leopold Toetsch
On May 21, 2006, at 3:46, chromatic (via RT) wrote: The multi-dispatch signature checking code in src/mmd.c does not know anything about :flat calls when it constructs the signature tuple for dispatching. Exactly. Snippets from S06: Multimethod and multisub invocants are specified at

[perl #39173] Multi-Dispatch Incompatible with :flat Params

2006-05-20 Thread via RT
# New Ticket Created by chromatic # Please include the string: [perl #39173] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=39173 > The multi-dispatch signature checking code in src/mmd.c does not know anything about :fla