dan-hankins@cup.portal.com (Daniel B Hankins) (10/29/88)
In the process of designing an object oriented language, I have come up
against two issues. I have some idea of what to do with them, but would
like to hear other opinions on the topic.
1. Should I have lexical scoping for classes? That is, should I allow:
class X;
.
.
.
class Y;
.
.
.
endclass Y;
endclass X;
where Y is a class name known only within class X. Y knows the names of:
* its scope-children classes
* its scope-sibling classes
* its scope-ancestor classes
Note that this is not an inheritance relation, only a class name
relation.
The purpose of this is to allow situations in which class DRINK and
class TOOL each have a subclass SCREWDRIVER, and each subclass has
different behavior. It also allows class X to have superclass Y. This
can actually be useful on occasion.
2. fine-grained inheritance control.
for instance:
class X;
superclasses A, B, C;
from L inherit K;
.
.
.
where K is a message pattern understood by L or the name of some local
datum of L. If K is a pattern name, then both the handler and any local
data it uses are inherited.
Any comments?
Dan Hankins