From: William Bland
Subject: Printing objects
Date: 
Message-ID: <pan.2004.09.03.02.11.22.216138@abstractnonsense.com>
Hello,
	This seems like it ought to be a FAQ, but google can't find an answer for
me - perhaps I just don't know what to search for?

Is there a way to tell the Lisp printer how I want instances of a given
class to be printed?  I thought WRITE might be a generic and that I could
just add a method that specialised on my class, but this doesn't seem to
be the case (unless I'm hopelessly confused, which is entirely possible).

Thanks for any pointers.

Cheers,
	Bill.
-- 
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax.   (Ken Anderson).

From: William Bland
Subject: Re: Printing objects
Date: 
Message-ID: <pan.2004.09.03.02.40.48.490544@abstractnonsense.com>
On Fri, 03 Sep 2004 02:17:10 +0000, William Bland wrote:

> Hello,
> 	This seems like it ought to be a FAQ, but google can't find an answer for
> me - perhaps I just don't know what to search for?

Sorry, I just googled for a few more minutes and found print-object.

Peter, maybe it makes sense to add this to chapter 15 of PCLtB (at least
as a footnote)?  Seems (to me) like something people might want to do
fairly quickly, when they are first experimenting with CLOS (as I am at
the moment).

Cheers,
	Bill.
-- 
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax.   (Ken Anderson).
From: Peter Seibel
Subject: Re: Printing objects
Date: 
Message-ID: <m3vfew3vpz.fsf@javamonkey.com>
William Bland <·······@abstractnonsense.com> writes:

> Peter, maybe it makes sense to add this to chapter 15 of PCLtB (at
> least as a footnote)? Seems (to me) like something people might want
> to do fairly quickly, when they are first experimenting with CLOS
> (as I am at the moment).

Yeah, I'll look into that. Did you see the discussion in in Chapter 18
(the Spam Filter chapter)? Perhaps I should just move that earlier.

-Peter


-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: William Bland
Subject: Re: Printing objects
Date: 
Message-ID: <pan.2004.09.03.03.24.35.384911@abstractnonsense.com>
On Fri, 03 Sep 2004 03:01:44 +0000, Peter Seibel wrote:

> William Bland <·······@abstractnonsense.com> writes:
> 
>> Peter, maybe it makes sense to add this to chapter 15 of PCLtB (at
>> least as a footnote)? Seems (to me) like something people might want
>> to do fairly quickly, when they are first experimenting with CLOS
>> (as I am at the moment).
> 
> Yeah, I'll look into that. Did you see the discussion in in Chapter 18
> (the Spam Filter chapter)? Perhaps I should just move that earlier.
> 

No, I haven't got that far yet.  You could either move it earlier, or just
add a note somewhere in chapter 15 (or even 14) saying that printing of
objects will be discussed in chapter 18.  I think either way would work
fine.

Cheers,
	Bill.
-- 
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax.   (Ken Anderson).
From: Thomas A. Russ
Subject: Re: Printing objects
Date: 
Message-ID: <ymi656vcjze.fsf@sevak.isi.edu>
PRINT-OBJECT is the generic function you are looking for.

-- 
Thomas A. Russ,  USC/Information Sciences Institute