Prototypes
- Conventional OO languages make objects by instantiating from classes.
Cons:
- Need to make new class to make a new kind of object
- To change an object's behavior or structure, need to change the class.
- Browse classes, not objects.
- In SELF, new objects are made by copying existing ones.
Safe to change a copy.
|
Prototypes
Self is a prototype-based language. What does this mean?
Conventional object-oriented languages use classes to define the structure and
behavior of objects. When a new object is required, a class must be instantiated .
Modifying an object's structure or behavior means the class has to be modified.
There are disadvantages to this approach:
|