Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!udel!princeton!phoenix!eliot From: eliot@phoenix.Princeton.EDU (Eliot Handelman) Newsgroups: comp.lang.lisp Subject: Re: conc-name in DEFSTRUCT Message-ID: <7580@phoenix.Princeton.EDU> Date: 4 Apr 89 21:52:32 GMT References: <7564@phoenix.Princeton.EDU> <38532@think.UUCP> Reply-To: eliot@phoenix.Princeton.EDU (Eliot Handelman) Organization: Princeton University, NJ Lines: 41 In article <38532@think.UUCP> barmar@kulla.think.com.UUCP (Barry Margolin) writes: >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.] >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). Right, I wasn't sure if the accessors were required to do type-checking, or if there was some way to ovverride that, or whether there should be some way. >Perhaps you should be using the :include option if you want to allow >one structure's accessors to be used with a similar structure. :include has one undesirable side effect, though, in that the predicate of the included structure is true for the second structure. In the implementations I'm using TYPE-OF returns the most specific type, but I don't think that CL guarantees that behaviour. Anyhow :include suits my purposes. >Or >maybe you want a real object-oriented programming facility, such as >CLOS. I had PCL going in Lucid on a vax-8700 and it was great, but it's really too slow in KCl on a microvax II (our departmental machine). If somebody wants to donate a Symbolics machine to a music department, it would be put to fairly unusual use. You'll get mentioned in my thesis. You'll get a tax rebate. >>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. Thanks for the help.