Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: Question about INTERN Message-ID: <4091@skye.ed.ac.uk> Date: 11 Feb 91 17:29:53 GMT References: <1991Jan29.055536.1523@magnus.ircc.ohio-state.edu> <5783@idunno.Princeton.EDU> <4037@skye.ed.ac.uk> <5821@idunno.Princeton.EDU> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 31 In article <5821@idunno.Princeton.EDU> eliot@phoenix.Princeton.EDU (Eliot Handelman) writes: >In article <4037@skye.ed.ac.uk> jeff@aiai.UUCP (Jeff Dalton) writes: >;In article <5783@idunno.Princeton.EDU> eliot@phoenix.Princeton.EDU (Eliot Handelman) writes: >;>Common Lisp says that (TYPE-OF any-house) might return T. >; >;Actually, according to CLtL II, page 66, TYPE-OF never returns T. > >Yes, I'm wrong, but anyhow CLtL II isn't Common Lisp (or so I've >been led to believe from some recent discussion on the common lisp >mailing list, for as Steele says in the preface, "In no way does this >book constitute a definitive description of the *forthcoming* ANSI >standards" (pg xii, my asterisks)). You're right that CLtL II isn't Common Lisp, as the preface says. But CLtL I is as close to definitive as we can get at present, and it also says TYPE-OF returns the appropriate type for a defstruct. Moreover, CLtL II is the best source we have for what X3J13 intends as well as to what implementations that have tried to follow X3J13 may have done. I don't think the X3J13 draft is yet sufficiently solid to take over as the main definition of CL, and so when we have to cite some source CLtL II is about as good as it gets at present. The main cases where it's best not to follow CLtL II too closely are when something appears to be an artifact of the language used in CLtL II and so not necessarily a reliable account of the language. However, you are certainly right is steering programmers away from TYPE-OF. Barmar has a good suggestion, namely to use (TYPEP x type) rather than (EQ (TYPE-OF x) type). -- jeff