done by Tear
logo done by Tear :: pouët.net is hosted on the huge scene.org servers




Any good books for Javascript data structures?
category: code
go to page of 1  
All the books I can find round THIS way are for C and C++ , and they will (naturally) use pointers.

I want to do it in Javascript which HAS no pointers.
So - does anyone know?

Some websites would do fine as well, but I'd really like the opinion of people here, NOT Google! :)

Thanks.
added on the 2012-08-17 15:29:42 by bitnaughty  
bitnaughty
You mean you can't do references to objects with javascript? Pointers are just an implementation detail.

There are a lot of algorithm books using Java. My university course used this: http://www.amazon.com/Data-Structures-Algorithm-Analysis-Edition/dp/0132576279 (though it's probably not a very good book to start out with.
added on the 2012-08-17 15:47:52 by elsewhere  
elsewhere
Quote:
Some websites would do fine as well, but I'd really like the opinion of people here, NOT Google! :)

Opinions on what exactly? This is mostly a language agnostic topic taught in first or seconds semester CS courses. Any "algorithms and data structures" book should be fine. Implementation details differ of course, but really, five seconds of google and you have what looks like a pretty long and decent article on the topic that should give you a nice overview how things work in JS.
added on the 2012-08-17 16:13:37 by tomaes  
tomaes
I'd say that data structures, as a topic, doesn't really exist in Javascript in the same way that it does for C, because most of the things you would want to build with pointers are already built into the language.

Queues, dequeues, stacks = arrays
Hash tables = objects

There are of course higher level structures like trees and graphs, but at that level you're not really thinking in pointers anyway. (If you're building a tree structure, you might make an assignment like node.parent = otherNode; in C you'd have to explicitly declare the type of 'node.parent' as a pointer to another node, but as Preacher says, that's just an implementation detail - in Javascript you're just making a reference to another object.)
added on the 2012-08-17 16:40:45 by gasman  
gasman
Thanks a lot for your input, Gasman, that's exactly the info I was looking for - what a coincidence, I was just checking out YOUR website, and I came back and found you had posted on Pouet :)
I think I have to study a bit more before I understand what you said up there, but still, thanks for saying it! :)


Hey - is there a video anywhere of the talk you gave on your JS Spectrum emulator?

added on the 2012-08-17 16:56:37 by bitnaughty  
bitnaughty
go to page of 1  

post a new reply
You need to be logged in to post a new reply :: register here





pouët.net 0.9-a9e6b6e © 2000-2013 mandarine - hosted on scene.org
send comments and bug reports to webmaster@pouet.net - contribute on GitHub
page created in 0.017848 seconds.