Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-31 Thread Michael Zedeler.
On 2014-03-31 14:49, Michael Zedeler. wrote: On 2014-03-29 21:45, Damian Conway wrote: Moritz wrote: To spin the tale further, we need to think about what happens if somebody writes multi foo(1|2e0) { ... } so now we have Int|Num. We could explore the most-derived common ancestor (Cool), or l

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-31 Thread Michael Zedeler.
On 2014-03-29 21:45, Damian Conway wrote: Moritz wrote: To spin the tale further, we need to think about what happens if somebody writes multi foo(1|2e0) { ... } so now we have Int|Num. We could explore the most-derived common ancestor (Cool), or look into role space (Real, Numeric come to min

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-29 Thread Damian Conway
Moritz wrote: > To spin the tale further, we need to think about what happens if > somebody writes > > multi foo(1|2e0) { ... } > > so now we have Int|Num. We could explore the most-derived common > ancestor (Cool), or look into role space (Real, Numeric come to mind), > or simply error out. Or m

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-28 Thread Moritz Lenz
On 03/28/2014 02:28 PM, Parrot Raiser wrote: > On 3/27/14, Moritz Lenz wrote: > >> Agreed. We "just" need to come up with a consistent, intuitive way to >> handle the rest of the cases. And implement it. >> > > Whenever somebody offers a solution to a problem formulated as "We > just need to .

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-28 Thread Parrot Raiser
On 3/27/14, Moritz Lenz wrote: > Agreed. We "just" need to come up with a consistent, intuitive way to > handle the rest of the cases. And implement it. > Whenever somebody offers a solution to a problem formulated as "We just need to " (or "why don't you just?"), it's usually a sign tha

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-27 Thread Moritz Lenz
On 03/19/2014 11:06 AM, Damian Conway wrote: > To me, the issue is: how does Perl 6 actually carry out the > type inference we're doing here? > > And I believe it's an important question to get right, as we > may eventually see Perl 6 doing more type inference...either > in core, or else through

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-21 Thread Damian Conway
To me, the issue is: how does Perl 6 actually carry out the type inference we're doing here? And I believe it's an important question to get right, as we may eventually see Perl 6 doing more type inference...either in core, or else through some nefarious module that some evil genius eventually wri

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-19 Thread Darren Duncan
On 2014-03-19, 1:20 AM, Moritz Lenz wrote: On 03/19/2014 12:45 AM, Darren Duncan wrote: Damian, Moritz, etc, It seems to me that the basic problem here is that the vertical bar | has 2 different meanings (outside rules) depending on context. When used with type names it produces a union type,

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-19 Thread Moritz Lenz
f'up to p6l, because the ticket doesn't need the rest of the discussion. On 03/19/2014 10:21 PM, Darren Duncan wrote: > On 2014-03-19, 1:20 AM, Moritz Lenz wrote: >> On 03/19/2014 12:45 AM, Darren Duncan wrote: >>> Damian, Moritz, etc, >>> >>> It seems to me that the basic problem here is that the

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-19 Thread Moritz Lenz
Hi, On 03/19/2014 12:45 AM, Darren Duncan wrote: Damian, Moritz, etc, It seems to me that the basic problem here is that the vertical bar | has 2 different meanings (outside rules) depending on context. When used with type names it produces a union type, while with normal values such as intege

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-18 Thread Darren Duncan
Damian, Moritz, etc, It seems to me that the basic problem here is that the vertical bar | has 2 different meanings (outside rules) depending on context. When used with type names it produces a union type, while with normal values such as integer literals it produces a junction value. Routi

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-18 Thread Damian Conway
> As I read the specs, > > multi fib(0|1) { 1 } > > would be short for > > multi fib(Junction $ where 0|1) { 1 } > > which I believe doesn't do what you want. Ah, yes, that's certainly consistent. Though not, perhaps, very useful. So maybe it's better that it doesn't compile at all. ;-) I guess I

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-18 Thread Moritz Lenz
On 03/17/2014 05:19 PM, Damian Conway (via RT) wrote: # New Ticket Created by Damian Conway # Please include the string: [perl #121454] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=121454 > On the 2014.01 release of Rakudo

[perl #121454] Can't inline complex constraints in multisub signatures

2014-03-17 Thread via RT
# New Ticket Created by Damian Conway # Please include the string: [perl #121454] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=121454 > On the 2014.01 release of Rakudo, this works as expected: subset Zero of Int where