Arrays methods

Joe Bowbeer joe.bowbeer at gmail.com
Mon Mar 11 12:04:31 PDT 2013


I wonder whether a range of one parameter is worth more than it confuses.
For one thing, '0, ' is trivial. For another, it is explicit, which avoids
the lingering question of whether the range starts at 0 or 1. Finally, I
think there is already potential confusion due to the optional 'step'
parameter.
On Mar 11, 2013 11:46 AM, "Brian Goetz" <brian.goetz at oracle.com> wrote:

> FWIW we could add range methods that takes one parameter:
>>
>>    range(array.length)
>>
>> I think that would be better than indices.
>>
>
> And only one is needed there rather than 9.
>
> Current plan, unless someone objects:
>  - remove Arrays.indices() methods
>  - add Arrays.fill() methods
>  - add Streams.intRange(n) method as Paul suggests
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130311/d8d95d02/attachment.html 


More information about the lambda-libs-spec-experts mailing list