Hacker News new | ask | show | jobs
by hueyp 4354 days ago
I would add:

'Hey Underscore, You're Doing It Wrong' -- http://www.youtube.com/watch?v=m3svKOdZijA

It is much better than the title would suggest :)

3 comments

This is a great introductory video to some basic functional programming concepts. I highly recommend it.
I'm intrigued by this style in javascript but it seems like swimming uphill. Note all the annotations in comments he has to give so that he can understand how his functions will compose correctly.
I think it's a style that you ultimately shoot yourself in the foot the first five times you attempt it, but eventually you end up in a better place for it.

Overall, I feel that the idea of looking at Events as Streams is a step in the right direction and having well composed functions is a key piece of making that dream a reality.

Any summary/writeup for this talk. 36 minute is a long time to find out whether it matters to you, even a quarter of that is too long. There should be some summary.
Underscore makes iterable the first argument, and function the second. The speaker thinks this is backward, since making function the first argument and iterable the second gives you automatic currying. This is the order followed by Ramda (https://github.com/CrossEye/ramda), as well as Python's standard library (https://docs.python.org/2/library/functions.html#filter)
If you watch the first two minutes, he explains what the talk is about.

But I'll save you two minutes: Underscore describes itself as affording Functional Programming, but in fact.. it doesn't.

He then goes over several examples of common FP patterns, like currying, composition, and functors, and shows how underscore fails in these regards, and how you can do so much better if a few things were done differently in the library.

Did you create a pull request?