I think Javascript is a fantastic language. I like all the little peculiarities, the inheritance model, the lack of classes, etc. Because of this I have never wanted to learn a framework as all of the ones I’ve looked at (jQuery, MooTools, Prototype, Dojo) force you to change how you write your code, in many cases it’s not really even Javascript anymore.
Yet, I feel the same frustration every time I have to implement something as fundamental as a hash table or a linked list. Sure, I write it once and never again, but given how many times these structures have been coded by other people before me I really shouldn’t have to.
Are there any “pure” Javascript libraries that will give you a bunch of basic data structures and utilities, similar to what you find in java.util? Again, I don’t want anything that changes the way I code, I want to use these objects within vanilla Javascript.
Thanks
Google’s Closure library has lots of data structures in it. The API documentation is at http://closure-library.googlecode.com/svn/docs/index.html (check the
goog.structs“package”).