On Jan 16, 2012, at 2:16 PM, Brendan Eich wrote:
> ...
> 2. Variation on empty label: support "do" as a reserved-identifier label that
> is implicitly addressed by break; and continue; (no labels on the break and
> continue). A little Smalltalk homage and not so visually nasty and
> potentiailly confusing as empty label.
>
> do: arr.forEach {|o|
> if (...) break;
> ...
> }
do: arr.alternate ({|o| if (...) continue; if (...) break; ...}, {|o| if (...)
continue; ...});
I don't see how this can support the most likely intended semantics:
do:arr.alternate (:{|o| if (...) continue; if (...) break do); ...}, : {|o| if
(...) continue; ...});
might, but ugly
Allen_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss