
Class Warfare: Classes vs. Prototypes - kqr2
http://www.laputan.org/reflection/warfare.html
======
blasdel
I find Prototype.js to be really depressing, and one of the most ironically
named libraries ever. The whole point of it is to bludgeon Class-based
bullshit into the only pure Prototype-based language anyone uses. It's named
after the concept it's designed explicitly to stamp out!

~~~
camccann
Nitpick: Doesn't Lua use a prototype-based OO system?

Insofar as Lua can really be said to have an OO system, that is.

~~~
blasdel
Absolutely, and through its use in the games industry it's easily the second-
most popular Prototypical language in use -- but the ECMAScript languages are
orders of magnitude more popular.

------
russellallen
Abstracting behaviour out so that it can be shared by differing objects is a
useful thing to be able to do. Putting shared behaviour (and maybe also
assertions as to the structure of 'instances') in another object and calling
it a 'class' is one way to achieve that -- but not the only way.

If you liked this I would recommend reading "The Treaty of Orlando" (DOI
10.1.1.55.482) and also anything you can get your hands on about a small
forgotten language by Antero Taivalsaari called "Kevo".

Kevo was a prototype based OO language without any delegation or 'parent'
slots. Every object was self-contained and carried around within it all of the
functionality it needed. Functionality was shared by copying, and shared
behaviour was not reified into a separate object (whether called a 'class' or
not)

------
richcollins
Obligatory plug for Io, my favorite prototype based language:
<http://www.iolanguage.com/>

~~~
phaedrus
Seconded. I actually discovered Io specifically due to the prototypes vs.
classes issue. After running into the limits of class based design while
working on a moderately large codebase for a commercial program, I began to
question what it would mean, philosophically, for a language to have objects
but no inheritance (and by extension no classes), and that led me to finding
Io.

