develooper Front page | perl.perl6.language | Postings from September 2009

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

Thread Previous | Thread Next
From:
David Green
Date:
September 19, 2009 01:37
Subject:
Re: [perl #69194] rakudo 2009-08 and when with lists
Message ID:
0A20CC11-F179-4888-ABFE-5351CE125D67@telus.net
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.

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 type and one Range-plus-Series type.


-David


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About