4 ms·
I'm not quite sure what the end-game is, here? Several of the functions listed here are quite different from their Haskell counterparts in ways that make them
by pdpi 11y ago
I'm not quite sure what the end-game is, here?
Several of the functions listed here are quite different from their Haskell counterparts in ways that make them subtly less useful — and in ways that make them not have the same types as the Haskell originals, which is interesting considering we're barely given more than the type of each of the functions. flip and zipWith are the ones that were quite obvious to me, others might have the same problems (with flip being outright wrong due to it inverting all the arguments instead of flipping the first two, and zipWith working fine with two lists, but generalising to multiple lists in a way that can't be a generalisation of the two-list zipWith). Composition also works in reverse to what one would expect in Haskell, for no reason I can fathom.
- deleted 11y ago[deleted]
- davidguerrerom 11y agojnjkblbkb
- sdegutis 11y ago> I'm not quite sure what the end-game is, here? My guess is that it's to show that (1) Haskell is pretty awesome, and (2) EC6 is pretty awesome too. In reverse order maybe?
- pdpi 11y agoIn my mind it doesn't achieve either. Functional programming isn't an end unto itself, it's one of several strategies for breaking programs down into manageable chunks. Without showing how this type of tiny function is used in journeyman Haskell code, nor showing how the translation to ES6 would apply to real world JavaScript, it just feels like functional wankery.
- sdegutis 11y agoWell, I agree that code for the sake of code is dumb. But I can also imagine practical applications for these things. So, it gets a +1 from me.