I know that Sun has had some research on Self - is there any other source of knowledge on prototype based oo? preferably something that is accessible for self learned.
I found a book that contains published papers: Prototype-Based Programming: Concepts, Languages and Applications
Has anyone read it?
So I gave the bounty for the answer that gave me most. Still, I'm not really satisfied. I would have liked to hear much more techical answers. Maybe I didn't explain myself well.
If you're looking for someone to point out the advantages/disadvantages of each as an explanation for their popularity, I think you're falling for a fallacy which is for some reason very common in technology - that popularity has something to do with some absolute measure of quality.
The truth is a lot more bland - class based OO is popular because Java uses classic OO, and Sun spent millions of dollars and a very long time building the popularity of Java - making sure people know it's used successfully in corporations, taught widely in universities, and on high school AP tests.
In classical OO, you define an abstract hierarchy of classes for your objects, and then actually work with instances of those classes. In prototypal inheritance, you create a hierarchy of object instances. Although I imagine it might be a bit heretical in both camps, I don't see a reason you couldn't mix the two...
I don't know the exact reasons for this, but here are my reasons
I think this argue is the same as Dynamic vs Static, a class is the static definition of the object, that can be used easily to know what to expect from an object, it also helps tooling the languages to have proper intellisense support and documentation because you can easily know what are the different members and methods in the object, another thing is the different paradigm of having the ability to declare private members in the class that doesn't show on the object, this can't be done in the prototype paradigm.
The prototype paradigm is nice, however it lacks the ability for providing information about the methods and members in the object, which makes the tooling harder, and it also makes more sense for dynamic typing programming.
The argument put forth in the papers is that it is easier to learn. There is really no technical benefit proposed other than learning. The papers all explain how it is just as expressive as a class-based language but much easier to learn. People naturally think about things in a concrete manner rather than in the abstract. We think of the elephant we saw at the zoo, not a generic "elephant". When we see other elephants, we classify them as differences from the first one. A prototype-based language facilitates this thinking. Think of it as programming by differential.
If interested, you might start with this paper about self.
http://en.wikipedia.org/wiki/Prototype-based_programming#Criticism explains it quite well I think.
I really don't want to write another article about prototypal inheritance again so I'll just link you to my previous articles. Mind you, they are really long but well worth the read:
Paraphrasing one famous saying:
Talent does what he can (read: class-based), genius does what he wants (read: prototype-based).
©2020 All rights reserved.