I agree there needs to be an API way to iterate over generic iterables, but Set and Map both have forEach, and Array.from + mapper exists.
-
-
Replying to @ljharb @BrendanEich
Sure, or `[...mySet]` But processing iterables is sort of the whole point of `for of`. When did it become a bad thing?
1 reply 0 retweets 2 likes -
Replying to @AdamRackis @BrendanEich
it’s a loop. loops fail to signal your intention; you’re saying how to iterate instead of why you’re iterating.https://gist.github.com/robotlolita/7643014#file-loops-are-evil-md …
3 replies 1 retweet 10 likes -
Replying to @ljharb @AdamRackis
I use loops still; if statements too ;-).
3 replies 5 retweets 35 likes -
@BrendanEich, do you prefer for over map? Which do you prefer and why?1 reply 0 retweets 0 likes -
Loop helps to break (no mutation) early, esp. return early w/ breaking value. Array some/every doesn't work. Immutabe map &c is wonderful.
4 replies 1 retweet 18 likes -
some/every/find/findIndex work fine with a closure behind an abstraction; I’d love to have a way to end all iteration methods early tho.
2 replies 0 retweets 1 like -
I proposed block lambdas as alternative to arrows, but TC39 rejected control effect correspondence principle: return from dead frame throws.
2 replies 1 retweet 9 likes -
Replying to @BrendanEich @ljharb and
This was discussed extensive on this es-discuss thread, Jan 2012 https://esdiscuss.org/topic/block-lambdas-break-and-continue …
1 reply 0 retweets 4 likes -
Replying to @awbjs @BrendanEich and
I was a big fan going in, but by the end I was convinced Smalltalk style blocks and c-style control statements do not play well together
2 replies 0 retweets 5 likes
I'm really disappointed that I joined after this decision. I didn't then, and still don't today, buy this. But stare decisis.
-
-
You can forever believe :-P.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.