kerry@ADS.COM (Kerry Koitzsch) (05/08/91)
Greetings CLOS/PCL users; john@linus.mitre.org was asking why "this stuff", i.e. the save-object code posted yesterday, didnt use MAKE-LOAD-FORM to define the various 'creation forms', which then get evaled at load time to restore those objects saved to a file. well, theres no reason why not, if you have a LISP that supports MAKE-LOAD-FORM, and, implicitly, a full-blown CLOS. We essentially use Lucid 4.0 Sun Common Lisp and earlier, Symbolics 7.2 on the Lispms. Generally we use PCL instead of the commerical CLOSes. Looking at page 659 of CLtL2, can one define MAKE-LOAD-FORM methods on builtin-class instances, such as hash-table? An interesting variety of problems with the new save object code have been pointed out to me, some of which I dont know how to solve: for example, how to get a class objects metaclass from (find-class 'whatever-class)? Where to store the contents of slots with :allocation :class? would this become the :initform value in the 'creation form'? Which LISPs now support CLtL2 including MAKE-LOAD-FORM-SAVING-SLOTS and friends? If people have the answers to these questions, i'd appreciate hearing from them: in addition, there is a new, two-file version of save-object available, slot-access.lisp contains the machine and CLOS/PCL version-dependent code for accessing slot, class, method and generic function attributes. This new code corrects several inadequacies in CLASS-FASD-FORM and elsewhere, including dealing with :readers, :writers, and :accessor class attributes. The second file, save-object.lisp, contains virtually the same code as the rev 1 save-object file, execept class-fasd-form and friends have been added. If you would like to see this code, drop me a mail message and I'll mail you these two files. Note: these two files supercede the one sent out yesterday. Thank you Ashok Khosla of Claris Inc. for the Allegro compatible defstruct code: that code is incorporated into save-object.lisp. These two files are marked "version 2b." happy file-io, kerry