The problem isn’t breaking MooTools, which can be updated. It’s breaking the long tail of abandoned sites that no one will ever update. Everyone thinks it’s cool the Space Jam website is still around and functional. Let’s preserve compatibility for future generations too!https://twitter.com/yaypie/status/971278838666801152 …
-
-
Replying to @tomdale @rtfeldman
Honestly if you told me Array.prototype.flatten was being added to JS, I'd *expect* the default depth to be unlimited. It's almost always what non-mathematicians want IME
7 replies 0 retweets 14 likes -
Same. It's in the name itself. The default result for flattening an array makes sense to be a flat array. If you want something else, `flatten` seems like a poor choice for a name. Maybe `unnest`?
2 replies 0 retweets 1 like -
Replying to @jamie_gaskins @searls and
Yehuda Katz 🥨 Retweeted Yehuda Katz 🥨
Yehuda Katz 🥨 added,
Yehuda Katz 🥨Verified account @wycatsReplying to @searls @tomdale @rtfeldmanIn Ruby, I often find myself making mistakes caused by infinite depth: http://people.map {|p| p.addresses }.flatten I don't expect further nested arrays to flatten, and usually don't remember that they're there (imagine using a tuple to represent an address)1 reply 0 retweets 0 likes -
I totally get that perspective, and I don’t think we’ll get a concensus about the default value. Almost all of my use cases for flatten have been pancaking nested arrays. For others, one layer is their jam. So I would prefer to see a more descriptive name instead.
1 reply 0 retweets 0 likes -
Replying to @jamie_gaskins @wycats and
I’ve commented on one of the issues (https://github.com/tc39/proposal-flatMap/issues/9#issuecomment-371693413 …), but if there’s a better place to discuss it I’m happy to post there. I’m unfamiliar with TC39 process so I’m happy to take suggestions.
1 reply 0 retweets 1 like
Commenting on a GitHub issue is a great way to contribute. Thanks!
-
-
Replying to @wycats @jamie_gaskins and
Can't tell if sarcastic (but I agree with Jamie regardless. Flatten sounds like deep, unwrap sounds like shallow)
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.