Path: utzoo!attcan!uunet!cs.utexas.edu!yale!cmcl2!phri!marob!cowan From: cowan@marob.masa.com (John Cowan) Newsgroups: comp.lang.lisp Subject: Re: STRUCTUREP Message-ID: <27133D6E.715C@marob.masa.com> Date: 10 Oct 90 15:25:33 GMT References: <753@forsight.Jpl.Nasa.Gov> Organization: The Logical Language Group, Inc. Lines: 16 In article <753@forsight.Jpl.Nasa.Gov> gat@robotics.Jpl.Nasa.Gov (Erann Gat) writes: >Is there any way in Common Lisp to test if an object is a structure? There >doesn't seem to be a structurep function. No, there isn't, and that's intentional. Some of the Common Lisp standard types, notably STREAM, READTABLE, RANDOM-STATE, PATHNAME, and PACKAGE may be implemented using the structure mechanism, but this fact is hidden from the user. A STRUCTUREP function would be unable to discriminate between these implementation-defined structures and user-defined ones. There's very little you can say about a structure qua structure, anyway. The names of the {access, constructor} functions aren't deducible from the outside, given that the default names can be overridden at DEFSTRUCT time. -- cowan@marob.masa.com (aka ...!hombre!marob!cowan) e'osai ko sarji la lojban