forEachUntil

Tim Peierls tim at peierls.net
Mon Feb 18 13:29:51 PST 2013


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.

--tim

On Mon, Feb 18, 2013 at 3:50 PM, Brian Goetz <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-observers mailing list