Ranges

Tim Peierls tim at peierls.net
Fri May 3 09:11:29 PDT 2013


On Fri, May 3, 2013 at 11:09 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:

> The same argument can be made for removing DoubleStream.range since one
> can use LongStream and map, but i am hesitant to go that far since we might
> be able to do something useful handling many edge cases associated with
> floating point numbers.
>

Yes, that sounds like trickier stuff.



> 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?

--tim


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