demuth@fifi.informatik.uni-dortmund.de (Thomas Demuth) (06/25/91)
A friend asked me for posting this (he has no permission to post) # When I used the PCL-package I have found the following problem : # I created with the function 'make-instance' my own instances for classes # I have written. They are named i.e. #<object10000000>. # During the program runs the names for the instances changed, that is the # numbers changed to i.e. #<object99999999>. # This happens for all the instances for one class. # Even old pointers to the instances return the same, new numbers. # # As I want to save the instances as strings on harddisc, sometimes they # change during the saving. So the same instance has 2 numbers on the disc. # # Finally I have to say that I use # - Sun Common Lisp, Version 3.01 base # - Sun PCL package # - CLX package. # # If someone could help me send a message to me. # Thanks # Klaus Wagner So long, Thomas Demuth, University of Dortmund, Germany
jonl%kuwait@lucid.com (Jon L White) (06/26/91)
re: I created with the function 'make-instance' my own instances for classes I have written. They are named i.e. #<object10000000>. Be careful! these printed out representations are proably NOT names (i.e., by names, you mean a symbolic "handle" from which you can subsequently retrieve the object). As I recall, PCL just prints out the actual address of the unnamed object; and of course due to the action of GC, these addresses will change with time. For saving objects out to files (on "harddisc"?), I would recommend the CLOS function MAKE-LOAD-FORM (see CLtL2 page 659 and following). Neither PCL, nor Sun Common Lisp version 4.0, contains this function, as it was added rather late in the ANSI standardization process. [However, experimental versions of Lucid's post-4.0 releases contain it. Lucid is the supplier of Sun Common Lisp, but I could not at all predict when Sun might be making the next release with this functionality in it.] -- JonL --