Live data from Hacker News

Lodash v3.0.0

lodash.com

21–30 of 82 posts

Re: Lodash v3.0.0

#21
We 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.

Re: Lodash v3.0.0

#22
post #18

Earlier quoted context omitted.

It's supposed to be better, faster, and stronger (more functions) than underscore. It's also under active maintenance from an enthusiastic dev. Do your own research, but I go with lodash.

Lazy.js claims to be even faster than both with support for lazy evaluation to boot. Not quite a drop-in replacement like lodash is, but I think it only requires a minor tweak.

seems like lodash now has lazy evaluation as well when using the _(obj).method() syntax:

http://filimanjaro.com/blog/2014/introducing-lazy-evaluation...

Re: Lodash v3.0.0

#23
I 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

#25
post #9
post #4

Really nice to see that there's now an auto-curried, function-first version, lodash-fp! I've been really attracted by Ramda JS recently for this reason. https://www.npmjs.com/package/lodash-fp

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?…

One situation where I felt compelled to use lots of currying was when I was working with a promise library for async code. There are lots of little callbacks you need to use and you benefit from having combinators that act as function versions of js operators, like "+", "[]" and so on and currying helps cut down on the number of combinators you need.

That said, I didn't end up being a big fan of it in the end. Other people can get confused by the new abstractions the combinators introduce and whenever you pass the wrong number of arguments to a function you end up with very tricky runtime errors (this isn't an issue in Haskell because the type system checks this for you)

Re: Lodash v3.0.0

#26
post #18

Earlier quoted context omitted.

It's supposed to be better, faster, and stronger (more functions) than underscore. It's also under active maintenance from an enthusiastic dev. Do your own research, but I go with lodash.

Lazy.js claims to be even faster than both with support for lazy evaluation to boot. Not quite a drop-in replacement like lodash is, but I think it only requires a minor tweak.

A new feature in 3.0 is that lodash now supports lazy evaluation using the chaining API from 2.x.

Re: Lodash v3.0.0

#27
post #23

I 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.

Yeah,the doc sucks a bit because you're supposed to know it's a "fork" of underscore. They could do a better job at explaining why lodash is useful, because it definetly is.It can really reduce the amount of js code one is writing by 2 or 3.

In a nutshell it's a collection of functions that work on arrays,objects and functions.It's a toolbox.

Re: Lodash v3.0.0

#29

We 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

#30
post #23

I 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.

I wish that it had mentioned what it was a library for. Took me longer than it should have to identify that it was a Javascript library.

I probably should have guessed, but I hate guessing wrong and missing out on something I could really use.

Post reply on HN