Thursday, March 02, 2006

Lecture 3 (3/3/06) : Objects and OOP

Cover object oriented programming in Spiral. I will go over several examples of OOP in code generator implementation.

Spiral Material


Handout: oop.txt
Demo transcript: oop-demo.txt

Object Model

Spiral's object model is based on the following paper:

David Ungar and Randall BB. Smith
Self: The Power Of Simplicity
Proc. OOPSLA '87
[ps.gz] [Self website]

Interesting quote from above:
Elimination of meta­regress. No object in a class­based system can be self­ sufficient; another object (its class) is needed to express its structure and behavior. This leads to a conceptually infinite meta­regress: a point is an instance of class Point, which is an instance of metaclass Point, which is an instance of metameta­ class Point, ad infinitum. On the other hand, in prototype­based systems an object can include its own behavior; no other object is needed to breathe life into it. Proto­types eliminate meta­regress.

Case study

To better explain and motivate OOP style programming we will use Spiral's internal representation of generated code as a running example.

0 Comments:

Post a Comment

<< Home