Menu Sidebar
Menu

Avdi Grimm

Hacker; code documentarian.

Thanks to Roberto Guerra on the Objects on Rails mailing list for making me aware of this fascinating paper:

The distinction between class-based and prototype-based systems reflects a long-lasting philosophical dispute concerning the representation of abstractions. Plato viewed forms — stable, abstract, “ideal” descriptions of things — as having an existence more real than instances of those things in the real world. Class-based languages such as Smalltalk, C++ or Simula are Platonic in their explicit use of classes to represent similarity among collections of objects. Prototype-based systems such as Self [UnS87], Omega [Bla91, Bla94], Kevo [Tai92, Tai93], GlyphicScript [Gly94] and NewtonScript [SLS94] represent another view of the world, in which one does not rely so much on advance categorization and classification, but rather tries to make the concepts in the problem domain as tangible and intuitive as possible. A typical argument in favor of prototypes is that people seem to be a lot better at dealing with specific examples first, then generalizing from them, than they are at absorbing general abstract principles first and later applying them in particular cases.

Prototypes give rise to a broad spectrum of interesting technical, conceptual and philosophical issues. In this paper we take a rather unusual, non-technical approach and investigate object-oriented programming and the prototype-based programming field from a purely philosophical viewpoint. Some historical facts and observations pertaining to objects and prototypes are presented, and conclusions based on those observations are derived.

The whole thing is very much worth reading (click the tiny PDF icon); I found the description of the Kevo language at the end particularly interesting.

7 Comments

  1. BTW, I also found this citation from that paper really interesting:
    Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems (1986)
    http://citeseerx.ist.psu.edu/viewdoc/summary;jsessionid=6EB42CB4B2154DD41FAFB5D5779B8C76?doi=10.1.1.48.69

    Reply

  2. Interesting find. However, I looked up how Kevo has fared, and it seems to have gone nowhere. Meanwhile, I believe that the analogy between computational artifacts and real world classification to be misleading. The real world is in some sense given to us as is, and what we do is model it however we deem best. But in the classical Turing computational world, nothing is given, and we create everything from atoms. A bit is a bit, a register is a register, and bottom up we have to account for everything precisely. There are no fuzzy “family resemblances” in processes running on our computers.

    Reply

    • Kevo didn’t fare well, but there is One language that has: Javascript. Much of the bad rap it receives is from us coming from ‘Classical’ OO languages not able to adapt to the concept of Protoypes. It is also one of the reasons many Javascript devs abhor all these attempts to ‘Classify’ Javascript (TypeScript, Dart, GWT, CoffeeScript, et al).

      Reply

      • That JavaScript rejects classes (and you are right, wrapper languages around it only “fake” them) is definitely interesting, but I’m not sure because of the presence of prototypes. Rather, as far as I can tell, the most interesting thing about JavaScript is the functional part, from its heritage as inspired by Scheme.

        Reply

    • Oh, also, when you look at the concept of DCI (http://www.artima.com/articles/dci_vision.html) is really an attempt to simulate Prototypes in Classy languages. There are benefits to this. However, to be honest, it is awkward at the moment because the languages don’t allow us to do this. I do hope we see some advancements in this area. I think it will put more focus on behaviour instead of classes (as it rightly should).

      Reply

      • Classes are not very interesting to me at all, actually. I come from a background in functional, not object-oriented programming. So for me, abstraction and behavior are most interesting, yes. That modern OO languages have started moving away from classes toward interfaces and traits is a good thing.

        Reply

        • Traits still don’t give us what prototypes do, yet. In Scala they can only be used when an object is instantiated. With prototypes, you can modify behaviour of an object at any time. Not really sure what other language allows us to do this without jumping through hoops(monkey patching is not a valid solution I think).

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Virtuous Code

"The three virtues of a programmer: laziness, impatience, and hubris" — Larry Wall

Books and Screencasts

RubyTapas Screencasts

RubyTapas Screencasts

Small plates of gourmet Ruby code.

Confident Ruby

Confident Ruby cover

32 Patterns for joyful coding.

The Making of Cowsays.com

Confident Ruby cover

Watch me build an app in Sinatra and Rails

Objects on Rails

Objects on Rails

A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.

Exceptional Ruby

Exceptional Ruby

The definitive guide to exceptions and failure handling in Ruby.

Archives

Categories