Brian Lonsdorf: Hey Underscore, You’re Doing It Wrong!

In this talk Brian Lonsdorf (@drboolean) gently takes a shot at underscore.js for not thinking about currying and partial function application in its library design. He shows that if they had, it would lead to much more awesome abstraction and would be data generic. He even dares to use words like “typeclasses” and “functors” in front of Javascript developers.

3 thoughts on “Brian Lonsdorf: Hey Underscore, You’re Doing It Wrong!

  1. Charles O'Farrell

    Great talk.

    Only one major complaint – the Either shown wasn’t a typical Haskell/Scala Either. In fact I’m fairly sure it wouldn’t pass the second functor law. You really just want a Mabye.orElse(Maybe) function:

    Maybe(null).orElse(Maybe(2)) == Maybe(2)

    You probably don’t want to be using falsy as your check for Nothing/None either – that would break the functor laws too.

    Still a very interesting/valid talk.

    Charles

Leave a Reply