Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-21 Thread David Green
On 2009-Sep-20, at 12:48 am, Larry Wall wrote: Yes, I think it's fair to say that either list context OR a :by turns a Range into a RangeIterator that matches like a list. Hence, this ought to match: (1,3,5) ~~ (1..5 :2by) OK; but I still have to ask why it returns a RangeIterator instead

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-20 Thread Larry Wall
On Sun, Sep 20, 2009 at 01:29:22AM -0400, Aaron Sherman wrote: : On Sat, Sep 19, 2009 at 9:45 PM, David Green wrote: : : > On 2009-Sep-19, at 5:53 am, Solomon Foster wrote: : > : > The one thing that worries me about this is how :by fits into it all. : >>rakudo: given 1.5 { when 1..2 { s

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread Aaron Sherman
On Sat, Sep 19, 2009 at 9:45 PM, David Green wrote: > On 2009-Sep-19, at 5:53 am, Solomon Foster wrote: > > The one thing that worries me about this is how :by fits into it all. >>rakudo: given 1.5 { when 1..2 { say 'between one and two' }; say >> 'not'; }; >>rakudo: given 1.5 {

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread David Green
On 2009-Sep-19, at 5:53 am, Solomon Foster wrote: On Sat, Sep 19, 2009 at 6:48 AM, Carl Mäsak wrote: David (>>>), It sounds like the split personality of Ranges strikes again. I still think it makes more sense to have one Series-only type and one Range- only type, rather than one Series ty

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread Solomon Foster
On Sat, Sep 19, 2009 at 6:48 AM, Carl Mäsak wrote: > David (>), Moritz (>>), Aaron (>>>): 2,3 constructs a list. 2..3 also constructs a list, unless it's in a given/when condition in which case it's just a range. >>> >>> No. 2..3 is always a range. It's just list context that turns it in

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread Carl Mäsak
David (>), Moritz (>>), Aaron (>>>): >>> 2,3 constructs a list. 2..3 also constructs a list, unless it's in a >>> given/when condition in which case it's just a range. >> >> No. 2..3 is always a range. It's just list context that turns it into a >> list. >> >>> That seems confusing. > > It sounds l

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread David Green
On 2009-Sep-18, at 8:44 am, Moritz Lenz wrote: Aaron Sherman wrote: 2,3 constructs a list. 2..3 also constructs a list, unless it's in a given/when condition in which case it's just a range. No. 2..3 is always a range. It's just list context that turns it into a list. That seems confusing.

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-18 Thread Moritz Lenz
Aaron Sherman wrote: > Redirecting thread to language because I do agree that this is no longer a > matter of a bug. > > On Fri, Sep 18, 2009 at 9:28 AM, Moritz Lenz via RT < > perl6-bugs-follo...@perl.org> wrote: > >> On Thu Sep 17 08:53:59 2009, ajs wrote: >> > This code behaves as expected, ma

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-18 Thread Aaron Sherman
Redirecting thread to language because I do agree that this is no longer a matter of a bug. On Fri, Sep 18, 2009 at 9:28 AM, Moritz Lenz via RT < perl6-bugs-follo...@perl.org> wrote: > On Thu Sep 17 08:53:59 2009, ajs wrote: > > This code behaves as expected, matching 2 or 3 in only one out of th

[perl #69194] rakudo 2009-08 and when with lists

2009-09-18 Thread via RT
# New Ticket Created by Aaron Sherman # Please include the string: [perl #69194] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=69194 > This code behaves as expected, matching 2 or 3 in only one out of the three cases: my