News for hackers. Stuff that matters.
Re:Underscore.js: Annotated Source Code by shawndumas on Thursday October 07, 2010 @11:00AM (#1768044)
"It's the tie to go along with jQuery's tux."[1]

-----

[1]: http://documentcloud.github.com/underscore/

Re:Underscore.js: Annotated Source Code by chewbranca on Thursday October 07, 2010 @02:41PM (#1768936)
I don't understand this statement. Initially when I saw underscore.js a few weeks ago, I was under the impression it was a light weight js library for when you didn't want to use jquery or something even heavier. Do you use this in conjunction with jquery? Could someone please explain the use case for this library as their is a fair bit of duplication between this and jquery.
Re:Underscore.js: Annotated Source Code by jashkenas on Thursday October 07, 2010 @03:06PM (#1769040)
Underscore is intended to fit in nicely alongside jQuery -- in the handful of places where the two overlap (map, each, bind), Underscore delegates to the native browser implementations, providing quite a substantial performance boost over the jQuery versions. There is a benchmark script at the bottom of this page, and you can run it in your browser to see the difference:

http://documentcloud.github.com/underscore/test/test.html

In general, Underscore is intended for logic and data manipulation, and jQuery handles the DOM and Ajax calls.

Re:Underscore.js: Annotated Source Code by chewbranca on Thursday October 07, 2010 @04:03PM (#1769277)
Thank you for clarifying, I appreciate it. There are some very nice data manipulation functions in underscore, and its speed is impressive. I will definitely look into it more.