3 ms·
HoFs are not array comprehensions and array comprehensions aren't supported in ES6. https://gist.github.com/sleepyfox/1879845 https://gist.github.com/sleepyfox
by xiaoma 9y ago
HoFs are not array comprehensions and array comprehensions aren't supported in ES6.
https://gist.github.com/sleepyfox/1879845 https://gist.github.com/sleepyfox/1879845
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- masklinn 9y ago> HoFs are not array comprehensions and array comprehensions aren't supported in ES6. Neither of these is a claim I made so I'm not sure why you feel the need to point these out. However native HoF obviate much of the need for comprehensions, especially combined with terser "arrow functions". Languages like Smalltalk or Ruby do just fine without comprehensions for instance.
- maxscam 9y agoIf you quote the fact that coffeescript has significant whitespace, list comprehension and then in response say that javascript has HoF and iteration protocol, it does sound like youre trying to counter the point, so it seems like for someone to bring up the fact that they are not identical is fair game.