The difference between a class-based language (like Java or Python) and a prototype-based language (like Javascript)?


Staff member
<strong>Possible Duplicate:</strong><br>
<a href="">prototype based vs. class based inheritance</a>

This question came up at work the other day - what's the difference between a class-based language like Python, and a prototype-based language like Javascript? Aside from differing approches, both ways seem very similar and we struggled to find something that a class-based language could do that a prototype-based language couldn't, or vice-versa.

Can anybody elaborate or go into any detail on how they differ fundamentally?

I haven't found much online about the differences, just sites that show you how to accomplish one with the other (such as this: <a href="" rel="nofollow noreferrer">Simulating classes with prototypes in JavaScript</a>)

Any enlightenment appreciated!