Block Lambdas: break and continue

Grant Husbands esdiscuss at
Sun Jan 15 07:10:39 PST 2012

Herby Vojčík wrote:
> your 'for call {|| ...}' is great and simple solution for (unlabeled) break,
> but it is not so for continue.

To clarify, it matches what continue currently does for other loops,
which is what I was aiming for.

However, I do agree that early completion with a value is desirable
and that continue could easily be adapted to accept a completion value
for the block lambda. I didn't mean to exclude the possibility;
rather, I just hadn't passed comment on it.

Do note that if it's added into my proposal as it stands, we only gain
that functionality on lambda block usage that's labelled as loop-like.
I don't know whether you find that acceptable, but it might be the
only way that it can be widely accepted, due to TCP.

Grant Husbands.

More information about the es-discuss mailing list