brian.goetz at oracle.com
Mon Feb 18 13:32:01 PST 2013
Overloading forEach is certainly possible. However, I think that it may
well be subject to the same "this is not the method you are looking for"
confusion as forEachUntil was (though is probably slightly better in
On 2/18/2013 4:29 PM, Tim Peierls wrote:
> Overloading forEach isn't possible? I don't think extra uglification
> beyond including a canCancel argument is needed to reinforce the
> uncommonness of the usage.
> On Mon, Feb 18, 2013 at 3:50 PM, Brian Goetz <brian.goetz at oracle.com
> <mailto:brian.goetz at oracle.com>> wrote:
> Based on further user feedback, I think the name forEachUntil is too
> confusing; it makes people (including some members of this expert
> group) think that it is supposed to be an encounter-based limiting
> operation, rather than an externally-based cancelling operation.
> Until seems to be inextricably linked in people's minds to
> encounter order, with all the attendant confusion. People seem more
> able to understand cancellation, and in particular to understand
> that cancellation is usually a cooperative, best-efforts thing
> rather than the deterministic content-based limiting that people
> have in mind.
> Accordingly, I think we should rename to "forEachWithCancel", which
> is more suggestive (and, secondarily, the ugly name subtly
> reinforces that it serves uncommon use cases.)
More information about the lambda-libs-spec-experts