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 david.gr...@telus.net 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

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

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 like the split

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 cma...@gmail.com 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 into a

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 cma...@gmail.com 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

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 david.gr...@telus.net 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:

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 the

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, matching 2 or