jscl icon indicating copy to clipboard operation
jscl copied to clipboard

PRINT-OBJECT not used

Open mmontone opened this issue 3 years ago • 0 comments

PRINT-OBJECT is not used by WRITE family of functions.

Example:

CL-USER> (defclass person () 
... (firstname lastname))
#<standard-class PERSON>
CL-USER> (make-instance 'person)
#<instance PERSON (..) (..) >
CL-USER> (defmethod print-object ((person person) stream) 
... (print-unreadable-object (person stream :type t :identity t) 
... (format stream "A person")))
#<standard-method PRINT-OBJECT((PERSON PERSON) STREAM)>
CL-USER> (make-instance 'person)
#<instance PERSON (..) (..) >

Not super important, but I stumbled with this when looking at showing lambda-lists for function objects. I wasn't able to fix the implementation, but changing the implementation of the WRITE has some effect.

mmontone avatar Sep 01 '22 15:09 mmontone