In article <199609170730.JAA00533_at_biot.unice.fr> Erick Gallesio <eg_at_kaolin.unice.fr> 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 http://found.cs.nyu.edu/fox xoF divaD
NYU Media Research Lab fox_at_cs.nyu.edu baL hcraeseR aideM UYN
Received on Tue Sep 17 1996 - 14:19:24 CEST