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 arrays for
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
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
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
.sub
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
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, $z)
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
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
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
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
# New Ticket Created by chromatic
# Please include the string: [perl #39173]
# in the subject line of all future correspondence about this issue.
# URL: 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
11 matches
Mail list logo