Earlier quoted context omitted.
I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful?…
This slideshow [1] by one of the authors of Ramda.js goes over a JavaScript example in OO style and refactors it to functional style. Currying is used to complete the refactoring. I've linked to the slides on currying but you'll need to back up to follow the whole example. [1] http://scott.sauyet.com/Javascript/Talk/FunctionalProgrammin...
Lodash v3.0.0
31–40 of 82 posts
Re: Lodash v3.0.0
#32We switched from underscore to lodash several months ago, and haven't regretted it. The fact that lodash follows semver is huge. Underscore has introduced serious breaking changes in minor point-releases more than once, which is completely unacceptable for a utility library.
Semver isn't a requirement nor be-all-end-all, though.
Re: Lodash v3.0.0
#33Re: Lodash v3.0.0
#34A: "A utility library delivering consistency, modularity, performance, & extras."
Q: "Yeah, but what does it do?"
A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
Re: Lodash v3.0.0
#35I followed the link and saw "lodash" for the first time today. Oh, it's a library! With an API! In various formats! I always appreciate it when the top of the project page provides a one-liner explaining just what it is I'm looking at.
Re: Lodash v3.0.0
#36Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
These days, a lot of it is actually in the standard library - for example, array maps - and invoking lodash just calls the es5/es6 built in, with a slightly uglier syntax.
Re: Lodash v3.0.0
#37Earlier quoted context omitted.
http://stackoverflow.com/questions/13789618/differences-betw...
Thanks - it sounds as if you could use it as a drop in replacement for underscore.
The _.chain() method furthermore gives a nice functional style ways of building lists which is useful when building UI in React, like so:
var list = _.chain([1, 2, 3, 4, 5])
.filter(function (value) {
return value > 2;
})
.map(function (value) {
return value;
});
console.log(list);
// prints:
// [3, 4, 5]Re: Lodash v3.0.0
#38Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
Re: Lodash v3.0.0
#39IE6+ support! I wonder if that's real, full support, or more like a "there are serious bugs we'll probably never fix for old IE".
Working with old IE versions is loathsome (but still required for some of us), so libraries that just work there are much appreciated.
Re: Lodash v3.0.0
#40Q: "What does it do?" A: "A utility library delivering consistency, modularity, performance, & extras." Q: "Yeah, but what does it do?" A: "Oh, nothing but it does it consistently, modularly and performant. We also have functions for string handling in the extras module."
I also had no idea what this was until I got to the bottom of the page. Looks like a "better underscore.js". They should just say something to that effect upfront.