Concat <was> Re: Ranges
Paul Sandoz
paul.sandoz at oracle.com
Mon May 6 00:39:56 PDT 2013
On May 3, 2013, at 6:24 PM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
> On May 3, 2013, at 6:11 PM, Tim Peierls <tim at peierls.net> wrote:
>> FWIW it is edge cases like this [LongStream.range()] that can complicate the implementation at the expense of the most common cases.
>>
>> Can't you have two implementations, one for ranges wider than Long.MAX_VALUE, one for the rest (the common case), and pick which one to use at runtime?
>>
>
> Yes. IMO i don't think it should stop us doing the right thing API wise. I am just complaining a little bit :-)
>
FWIW it just occurred to me if we keep Streams.concat then that can be used to concatenate the two streams for ranges of known size.
Paul.
More information about the lambda-libs-spec-experts
mailing list