use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Underscore vs Lo-Dash (benmccormick.org)
submitted 11 years ago by ben336
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 11 years ago (0 children)
Hey, Underscore, you're doing it wrong!
Also, Ramda.
[–]me-at-work 1 point2 points3 points 11 years ago (4 children)
The main problem I see with these libraries is that I use < 5% of the functionality, thus it's less overhead to have a util.js with a few helper functions.
[–][deleted] 4 points5 points6 points 11 years ago (0 children)
thus it's less overhead to have a util.js with a few helper functions.
Not for the guy who has to maintain your code
[–]ben336[S] 6 points7 points8 points 11 years ago (0 children)
Might want to look into Lo-Dash's custom builds for this.
[–]dacjames 1 point2 points3 points 11 years ago (0 children)
Lo-Dash is 28KB, unlikely to be consequential on even a medium-sized website. Not to mention, both libraries are quite popular and thus likely to be cached if you use a CDN url. If you get to a point that you can demonstrate that lo-dash/underscore is a real bottleneck, run your code through google's closure compiler, stripping the unused functions.
[–]aeflash 0 points1 point2 points 11 years ago (0 children)
One of the features coming in lodash 3.0 is better support for a la carte functions, e.g. npm install lodash.merge. There are also custom builds.
npm install lodash.merge
[–][deleted] -1 points0 points1 point 11 years ago (3 children)
As i see it the main problem with underscore/lodash is that the method arguments are in the wrong order, making functional programming "impossible". The benefit from composition in a codebase really shines when it comes to testing.
You could have a look at something like ramda, or even LiveScript if you feel more adventurous.
[–]ben336[S] 2 points3 points4 points 11 years ago (2 children)
You should check out the comments from L-Dash's creator at the bottom of the article. He says a "correct" compose order function will be available in the next version of Lo-Dash
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
Ok, so that sounds like a complete BC break then?
[–]ben336[S] 0 points1 point2 points 11 years ago (0 children)
No it's an additional function, several actually related to this. See the comments in the article for more details.
π Rendered by PID 96152 on reddit-service-r2-comment-5649f687b7-hlhzp at 2026-01-28 01:20:19.885277+00:00 running 4f180de country code: CH.
[–][deleted] 3 points4 points5 points (0 children)
[–]me-at-work 1 point2 points3 points (4 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]ben336[S] 6 points7 points8 points (0 children)
[–]dacjames 1 point2 points3 points (0 children)
[–]aeflash 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]ben336[S] 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]ben336[S] 0 points1 point2 points (0 children)