home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!decwrl!parc!gregor
- From: gregor@parc.xerox.com (Gregor Kiczales)
- Subject: Re: Beware of print-object methods when debugging
- In-Reply-To: mlg@siemens.com.'s message of 21 Jul 92 17:55:57 GMT
- Message-ID: <GREGOR.92Jul21211018@tracer-bullet.parc.xerox.com>
- Followup-To: comp.lang.lisp
- Sender: news@parc.xerox.com
- Organization: Xerox Palo Alto Research Center
- References: <mlg.711741357@volvo>
- Date: 21 Jul 92 21:10:18
- Lines: 17
-
-
- Yes, this is one of many ways to lose with print-object methods. I
- sometimes think it would be nice if implementations provided some sort
- of switch, whereby you could disable the call to PRINT-OBJECT or
- something. Of course, you can do this on an application specific basis,
- by writing all your methods in the form:
-
- (defmethod print-object ((o foo) str)
- (if *use-default-printer*
- (call-next-method)
- (print-unreadable... )))
-
- In fact, in an application we have here, I have set it up so that, when
- running on a particular kind of machine, something very much like this
- is controlled by whether the mode lock key is held down.
-
- Gregor
-