change layout to type
This commit is contained in:
@ -19,14 +19,14 @@ In soml object is not the root of the class hierarchy, but Value is. Integer, Fl
|
||||
derived from Value. So an integer is *not* an object, but still has a class and methods, just no
|
||||
instance variables.
|
||||
|
||||
### Layout and Class
|
||||
### Type and Class
|
||||
|
||||
Each object has a layout that describes the instance variables and types of the object. It also
|
||||
reference the class of the object. Layout objects are constant, may not be changed over their
|
||||
lifetime. When a field is added to a class, a new layout is created.
|
||||
Each object has a type that describes the instance variables and types of the object. It also
|
||||
reference the class of the object. Type objects are constant, may not be changed over their
|
||||
lifetime. When a field is added to a class, a new Type is created.
|
||||
|
||||
A Class describes a set of objects that respond to the same methods (methods are store in the class).
|
||||
A Layout describes a set of objects that have the same instance variables.
|
||||
A Type describes a set of objects that have the same instance variables.
|
||||
|
||||
### Method, Message and Frame
|
||||
|
||||
|
@ -48,7 +48,7 @@ field definitions, and are basically instance variables, but not hidden (see bel
|
||||
The example below shows how to define local variables at the same time. Notice chaining, both for
|
||||
field access and call, is not allowed.
|
||||
|
||||
Layout l = self.layout
|
||||
Type l = self.type
|
||||
Class c = l.object_class
|
||||
Word n = c.name
|
||||
|
||||
@ -109,7 +109,7 @@ field, must be in class (not method) scope and may not be assigned to.
|
||||
|
||||
class Class < Object
|
||||
field List instance_methods
|
||||
field Layout object_layout
|
||||
field Type object_type
|
||||
field Word name
|
||||
...
|
||||
end
|
||||
|
Reference in New Issue
Block a user