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

Method and Generic Function internal names



It seems that pcl generates names for methods and setf generic functions by 
creating a symbol which includes a fully qualified name for the slot or 
method name.  As a result, I have had occasions where a reference to a method
was made at a time when that name was not yet exported, but the method 
defninition occurred using the exported name.  In these cases (which can
usually be fixed by recompling the correct files) the method (so far, always
a setf method) call fails, since the generic function is undefined.  For 
instance:

<cl> (apropos 'cursor (find-package 'pcl))
PCL::|(METHOD (SETF XCLOS::CURSOR-MODE) (T XCLOS::TEXT-BUFFER-GADGET))|
PCL::|(METHOD (SETF XCLOS:CURSOR) (T XCLOS::X-WINDOW))|
PCL::|(SETF XCLOS:CURSOR)|
PCL::|(SETF XCLOS::CURSOR-MODE)|
PCL::|(SETF XCLOS::CURSOR-MOVED)|
PCL::|SETF XCLOS:CURSOR| (defined)
PCL::|SETF XCLOS::CURSOR|
PCL::|SETF XCLOS::CURSOR-MOVED| (defined)
PCL::|SETF XCLOS::CURSOR-MODE| (defined)
PCL::|(METHOD NEW-INSTANCE (XCLOS::CURSOR))|
PCL::|(METHOD XCLOS::HIDE-CURSOR (XCLOS:CHAR-WINDOW))|
PCL::|(METHOD XCLOS::DRAW-CURSOR (XCLOS:CHAR-WINDOW))|
PCL::|(METHOD XCLOS::DO-DETACH (XCLOS::CURSOR))|


Note that the generic function for (setf cursor) is:

PCL::|SETF XCLOS:CURSOR| (defined)

but the reference which some of the code makes is:

PCL::|SETF XCLOS::CURSOR|


This is all in the 12/88 (no cute name) PCL.  

Questions:

	Is there an easy way to prevent this (other than enforced load orders 
or enforced export times?

	Has this changed in later PCL versions?

	Is it likely that PCL will eventually name methods and generic
functions with names which are transparent across import/export?

Joe Konstan
Picasso Project
UC Berkeley