Re: about genricity

From: David Fox <>
Date: 17 Sep 1996 08:13:20 -0400

In article <> Erick Gallesio <> writes:

] The various aspects of the MOP used here are:
] - class-name which gives the symbol associated to the class
] - class-slots which gives a list of slot descriptions. Each slot
] description being the list you gave when defining the slot.
] For instance, (class-slots child-class-1)
] returns ((a :init-keyword :a) (b :init-keyword :b))
] - slot-bound? which is a predicate which indicates if a given slot is
] bound.
] So,
] STk> (begin (write o1) (write o2) (write o3))
] (make parent-class :a 1)
] (make child-class-1 :b 2)
] (make child-class-2 :a 0 :c 3 :d 4)
] #[undefined]
] STk>

I've found that the main challenge in writing objects is when they
contain slots referring to other objects, and there can be multiple
references to a given object. I've ended up doing a topological sort
so that (absent any cycles) objects can be re-created in an order that
guarantees all the component objects exist before the container
objects need them.
David Fox		xoF divaD
NYU Media Research Lab    baL hcraeseR aideM UYN
Received on Tue Sep 17 1996 - 14:19:24 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST