Two small points of feedback

Paul Benedict pbenedict at
Fri Jan 4 07:44:40 PST 2013

Actually, introducing two methods would be a pattern that needs
replication in too many places. I'd rather see a third parameter added
that specifies EXCLUSIVE or INCLUSIVE.


On Fri, Jan 4, 2013 at 9:19 AM, Paul Benedict <pbenedict at> wrote:
> Solve it simply: introduce both rangeInclusive() and rangeExclusive()
> On Fri, Jan 4, 2013 at 9:05 AM, Brian Goetz <brian.goetz at> wrote:
>>> My theory is that its because the numbers are discrete. "From Monday
>>> to Wednesday" is closed in normal language, whereas "from 09:00 to
>>> 17:00" is not. Similarly "the TV channels 1 to 4" is closed, but "from
>>> 1.3 to 8.6" is more likely to be half-open.
>> And what about
>>    string.substring(0, 10)
>> or
>>    Arrays.sort(a, 0, 10)
>> or...?   These have discrete numbers too.
>> Given that either approach will be "surprising" to someone when taken
>> out of context (with 10M Java developers, someone will be surprised at
>> *anything*), I think you'd be pretty hard pressed to argue against
>> adopting the way the vast majority of similar JDK mechanisms work?

More information about the lambda-dev mailing list