But wait, data and functions for that data: isn't that just an object? I never see anyone state that prototyped objects are powerful though, and I've never seen a job listing say that they want applicants that can prototype objects. As a result I'm trying to get a better handle on the two, and who better to ask than you folks here on gameDev who know a lot about this sort of stuff.
There's a post about it here:
In any case, from what I can see, It looks like the practical differences come down to this:
Prototyped object advantages
They're faster. I've seen a couple of references like this one:
Which show that making prototypes is faster than making closures, probably just because you don't have to make new copies of all the functions each time.
As a result, it looks like closures are better overall if object creation speed isn't a concern, and prototypes are better if it is. However, I'm pretty new to this, so I'm probably missing a lot. Does this analysis look mostly correct? Are there other elements that come into play that I haven't thought of? Any thoughts would be aprreciated.