News for hackers. Stuff that matters.
Re:An introduction to the JavaScript Module Pattern by tkaemming on Saturday April 14, 2012 @01:10AM (#3839964)
It's worth noting that if you're planning on instantiating multiple instances of the same "class" (to use the term generically/loosely) instead of immediately invoking the function, the module pattern has a much more significant memory footprint than prototypical inheritance — total memory usage should increase linearly with the number of objects you're creating, since you're creating new copies of all member functions each time.

Jeremy Ashkenas (who knows a lot more about this than I do) explains this in another comment thread here: http://news.ycombinator.com/item?id=2991904

There are no comments on this comment yet.