3 ms·
This is a nice start towards something that might be useful. A few thoughts about stating that "101 will be maintained to minimize overlap with vanilla JS." th
by ben336 12y ago
This is a nice start towards something that might be useful. A few thoughts about stating that "101 will be maintained to minimize overlap with vanilla JS." though:
1. Lo-Dash and Underscore overlap with ES5 for a few reasons. First, it allows them to support environments where ES5 functions aren't available. Those are becoming less common but still exist. But the other big reason they overlap is that Underscore and Lo-Dash both outperform native functional methods by a significant amount. Unintuitive but true, see my comparison from a few weeks ago [0]
2. It's worth thinking about who this library is for. The support for common JS and highly modular nature of the library make it seem like it is focused on Node first. But the value in a smaller library becomes much more clear in the browser where page weight matters.
These aren't meant as criticisms, it's good to see new ideas. But it's worth thinking about what niche you're filling when you develop a library like this.
[0]: http://benmccormick.org/2014/11/12/underscore-vs-lodash/ http://benmccormick.org/2014/11/12/underscore-vs-lodash/
- tjmehta 12y agoLove your well thought out feedback. 1) IMO ES5 is highly available now and when it isn't you can use shims. 2) Will definitely add other module systems on request. Currently works in the browser with browserify.
- bsimpson 12y agoIsomorphic JS is only going to get bigger. Writing browser-friendly modules in CommonJS is an admirable strategy, especially since you're trying to avoid requiring your own custom build system. I use Webpack (similar to Browserify, but I understand Webpack's more powerful), and I can't imagine starting a new JS project without it.
- igl 12y agoThe significant performance difference is usually only noticeable at very large objects/arrays. A good read on the subject of performance and native method replacements: https://github.com/codemix/fast.js/tree/master#how https://github.com/codemix/fast.js/tree/master#how
- divmain 12y agoThere's another benefit to including map/reduce/filter in Lo-Dash and Underscore, and that is chaining. Were these methods removed in favor of native methods, _.chain would be much less useful.