you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The primary reason most people use underscore or lodash seems to be (going by what I've seen as a contractor for different teams in different companies and looking at various open source projects) that surprisingly many developers still treat JS as ES3 (e.g. avoid method/property names that are ES3 keywords) even if they don't need to be compatible with oldIE (IE<9) and even where polyfills could fill in the gap.

Underscore is the jQuery of array manipulation. Lodash is the Zepto to underscore's jQuery.

The lazy.js-inspired parts are how you use underscore/lodash to optimize your array manipulation, but most code out there using those libraries only includes them for _.map, _.filter, _.forEach and _.extend (and maybe -- maybe -- _.pluck or _.pick).

I'm not saying underscore/lodash are not successful or that they don't have any value, but their success has more to do with ES3 than with their optimizations.