[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PRINT-OBJECT, May-day classes & methods in same file
- To: tim@cstr.edinburgh.ac.uk
- Subject: Re: PRINT-OBJECT, May-day classes & methods in same file
- From: Gregor Kiczales <gregor@parc.xerox.com>
- Date: Mon, 1 Oct 1990 08:57:02 PDT
- Cc: commonloops.PARC@xerox.com
- Fake-sender: gregor@parc.xerox.com
- In-reply-to: "tim@cstr.edinburgh.ac.uk's message of Sat, 29 Sep 1990 11:38:43 PDT <6538.9009291838@kahlo.cstr.ed.ac.uk>"
- Sender: <gregor@parc.xerox.com>
X-Ns-Transport-Id: 08002008D0FD0002A873
Date: Sat, 29 Sep 1990 11:38:43 PDT
From: tim@cstr.edinburgh.ac.uk
I often use fairly complex after methods for INITIALIZE-INSTANCE,
typically for filling slots from a file. It *seems* to be the case
that trying to print an object before INITIALIZE-INSTANCE has done
its work is dangerous; is this true? It would make good sense if it
was.
Well, this depends on the print-object method you have defined,
applicable to objects of that class. If that method generates an error,
perhaps by attempting to access an unbound slot, then the printer will
run into troubles (exactly what kind depends on what Lisp you are using,
and whether you were in the debugger to start with.) PCL's default
methods on print-object are written so that they won't cause such
errors, you may want to re-write your methods to also do this checking.
Is it the case that the resulting compiled file *will* work OK? It
seems to on both the implementations I use (Xerox Medley & Franz
Allegro CL).
Yes, it will.