Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Re: conc-name in DEFSTRUCT Message-ID: <38532@think.UUCP> Date: 4 Apr 89 18:20:18 GMT References: <7564@phoenix.Princeton.EDU> Sender: news@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 30 In article <7564@phoenix.Princeton.EDU> eliot@phoenix.Princeton.EDU (Eliot Handelman) writes: >Ok, Should this or shouldn't it work? [Defines two different structures with the same (:conc-name common-) and same slot names.] >It doesn't work in either KCl or Lucid 2.2, because the access functions get >redefined in the second form. Would you like it to work? I would. What should it do? Either COMMON-X and COMMON-Y take a FOO or a QUUX, and it is an error to call them with the wrong type of structure. Be thankful you're using Lisp implementations that check at all (Symbolics CL never checks that structure accessors are given the correct type of structure). Perhaps you should be using the :include option if you want to allow one structure's accessors to be used with a similar structure. Or maybe you want a real object-oriented programming facility, such as CLOS. >Also, can someone tell me what the depth argument to user-defined print >functions for structures is good for? How is it set, for example? It's used to implement *PRINT-DEPTH* abbreviation. If the depth is larger than *PRINT-DEPTH* you may want to print just a "#", or abbreviate the format of your output in some other way. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar