4 ms·
I am so looking forward to a huge army of newly-trained programmers who view prototype-based inheritance as the default and classical inheritance as weird. Sim
by angelbob 15y ago
I am so looking forward to a huge army of newly-trained programmers who view prototype-based inheritance as the default and classical inheritance as weird.
Similarly, I look forward to a whole set of various modules and libraries to graft prototype-based inheritance onto existing languages like Ruby...
cackle
- kenjackson 15y agoUnfortunately I think that class-based inheritence is more general in concept. That is, people who understand class-based inheritence have a very small leap to get prototypal inheritence. You can pretty much just say, "Inheritence works on the instances/objects, not on the class." Explaining class based inheritence to people who only know prototypal seems trickier. You have to explain the concept of classes and then build from there. BTW, are there any prototypal languages that support multiple inheritence -- you can create an object from a set of an arbitrary number of objects?
- anon1385 15y agoIn Io you can add as many objects as you like to the protos list of an object: http://www.iolanguage.com/scm/io/docs/IoGuide.html#Objects-Inheritance http://www.iolanguage.com/scm/io/docs/IoGuide.html#Objects-I...
- kenjackson 15y agoNice. Thanks. How is it that I've never looked at the IO language before? Some reading for tonight.
- angelbob 15y agoThat is, people who understand class-based inheritence have a very small leap to get prototypal inheritence. I used to think that, and then I watched a lot of people try. It's harder than you think. I used a networked server used primarily for MUDs called DGD (Dworkin's Generic Driver) for awhile. The most common MUD libraries for that use prototype-based inheritance. I know mine (based on Skotos) supported multiple prototypes. I think Skotos did as well. It was interesting - it was pretty easy to explain the prototype-based inheritance to non-programmers. It was much more difficult (usually) to explain it to programmers. I don't think it's as much "class-based inheritance is good preparation and prototype-based inheritance isn't" as you think.