News for hackers. Stuff that matters.
Re:You Might Not Need Underscore by maroshii on Tuesday July 07, 2015 @06:15AM (#9844521)
One of the advantages of underscore (and lodash) is that you can iterate over arrays AND objects indistinctly in most cases. How would you do:

  var a1b2 = _.reduceRight({a:1,b:2},(memo,val,key) => key+val+memo,'');
or:

  var two = _.find({a:2,b:3,c:4},(val,key) => key !== 'a' && key !== 'c' )
Until I see _.chain, _.compose, _.partialRight, _.zip or _.throttle (among others) implemented in the standard library lodash is a no-opt.

With iterables and the "for of" loop javascript is definitely not going in the direction of functional programming though.

There are no comments on this comment yet.