Single page programs (Re: Configuring a Dynabook) (long)
Patrick Logan
patrickl at gemstone.com
Sun Dec 13 17:36:00 UTC 1998
This is a nice job for metaprogramming, and I'm hoping we can
exhibit some real improvements in this area in calendar '99. I
would like to solicit ideas about this that can help the
design. One of the most interesting "algebraic" areas parallels
that of the problems of multiple inheritance: what *kind* of
object is an instance that is being used as a composer? The
instance (at least in Squeak) belongs to a class by definition,
but one might want to derive some additional "classness" from the
objects in the instance, etc. (Please folks, rise above the
tendency to start debating "prototypes vs classes" again -- this
is a red herring in almost all areas and has almost nothing to do
with the current discussion ...).
This may or may not be in the ballpark, but I was reminded of an
experience from ten years ago...
I used an interesting language for about a year called the Carnegie
Representation Language, CRL, (which came with the KnowledgeCraft
product from Carnegie Group for Common Lisp, and was based on the
Knowledge Representation Language, KRL, from the same people at
Carnegie Mellon.)
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.
To take a very simple example, let's say there is a person and a
company. The person has a home phone, the company has a phone as
well. When the person goes to work for the company, a new relationship
is established, say, EMPLOYED-BY and EMPLOYS (relationships can be one
or two or N ways). By virtue of this relationship, the person now has
a "work phone". The relationship may define this to be the company
phone or it may define it to be the company phone plus some extension
that gets assigned.
Many relationships can be described declaratively, but when the steam
runs out of that, you can go even more meta and describe it using
Common Lisp (which can also access Prolog, OPS5, etc.)
It was kind of a kitchen sink product, but had some interesting
capabilities.
Another capability of the relationships was that they could become
segments of paths. So it may be significant not just that a person is
employed at a company but that the company is located in some region
and so on.
--
Patrick Logan mailto:patrickl at gemstone.com
Voice 503-533-3365 Fax 503-629-8556
Gemstone Systems, Inc http://www.gemstone.com
More information about the Squeak-dev
mailing list
|