[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xscheme, object functions



I've just obtained a copy of David Betz's Xscheme system. It claims
to be "An Object-oriented Scheme".

The documentation completely ignores the Object Oriented features
of the language. (They get less than one paragraph, describing
the syntax of a message pass.)

I've managed to hack out the method of describing a Class creation,
by referring to the documentation of Xlisp. What I've come
up with is:

   ] (define newclass (Class 'new '(instance vars) '(class vars)))

To define the class, and

   ] (newclass 'answer 'msgname '(args) '(method code))

to define methods. However, no amount of hacking seems to be
telling me how to access the instance variables, or the class
variables. 

Defining a method:

   ] (newclass 'answer 'what '() '((environment-bindings)
   ]                               (the-environment)))

yields ((self . #<object....>)), where .... is the object number,
so the instance variables are not in the environment of the
method. Where are they? How can I access them?

If Mr. Betz is reading this, I have a question for him: Why, on
earth, did you design an object oriented variant of scheme, and
then totally neglect to tell anyone how to use the objects?

	<MC>
-- 
=|                     Mark Craig Carroll: <MC>                       |=
=|       mccarrol@topaz.rutgers.edu,...!rutgers!topaz!mccarrol        |=
=|  "Your only obligation in any lifetime is to be true to yourself"  |=
=|                     -Richard Bach,_Illusions_                      |=