Single page programs (Re: Configuring a Dynabook) (long)

Bruce Cohen cohenb at gemstone.com
Mon Dec 14 23:29:01 UTC 1998


Patrick Logan writes:
>> A useful thing about this language is that "relationships" are first
>> class objects. When two objects become related by some relationship
>> the presence of that relationship cn bring out new things about those
>> two objects, or anything else for that matter, because you get to
>> define what happens when relationships come and go.

Stop me if I'm going to far here, but wouldn't it make sense to make a
first class notion of relationships be a fundamental component out of
which you build things like classes & prototypes?

So an instance object is related to a class object by the "INSTANTIATES"
relationship, an object is related to a prototype by the "DELEGATES"
relationship, etc.  Want multiple inheritance?  Develop a form of the
"INHERITS" relationship, call it "INHERITS-FROM-MANY" that is
many-to-many instead of one-to-many.  Want singleton instances of a
class?  Develop an "INSTANTIATES-ONE" that is one-to-one instead of
one-to-many.

While we're at it, if there's a specialization mechanism for
relationships, building those new ones would be easy.

I know a lot of energy has been wasted on which concepts are *most*
first class (genes vs. phenotypes, classes vs. prototypes, pigs
vs. other animals (you know, some are more equal)), and it is true that
a properly designed metalevel architecture can probably be based on any
self-consistent and sufficiently-powerful set of concepts, out of which
all others can be built.  Nevertheless, I suspect some metaconcepts are
more convenient as building blocks for some others, and relationships
strike me as a more convenient way to build both classes and prototypes,
as opposed to trying to build one out of the other.
-----------------------------------------------------------------------------
"A polar bear is a rectangular bear after a coordinate transform." - anon.
-----------------------------------------------------------------------------
Bruce Cohen,                               |  email: cohenb at gemstone.com
GemStone Systems, Inc.                     |  phone: (503)533-3602
20575 NW Von Neumann Drive                 |  fax:   (503)629-8556
Beaverton, OR USA 97006                    |  web:   http://www.gemstone.com





More information about the Squeak-dev mailing list