Article View: comp.lang.clos
Article #515SLOT-VALUE and structures
From: Jon L White
Date: Thu, 18 Apr 1991 01:01
Date: Thu, 18 Apr 1991 01:01
51 lines
3013 bytes
3013 bytes
[I suspect this question will continue to come up on this list for some
time; hence I will take the time here to outline what I think the main
concerns are for retaining the historic "lean" definition for DEFSTRUCT,
even in the face of the addition of CLOS.]
re: For several *years* the standard answer to the question ``How do I
access an arbitrary slot in a structure instance?'' has been
``Use SLOT-VALUE (when CLOS is available).''
You forgot the part about STANDARD-CLASS, whose default behaviour
is to retain the "meta" information in the image; i.e., convert
over from use of DEFSTRUCT to use of DEFCLASS.
re: All that is required is to maintain declarative information about the
implemenation of the structure. Most lisps already save this information
anyway for the benefit of functions like describe and inspect.
It certainly has never been in the Common Lisp contract that the Lisp
must "save" this information. Delivery applications typically DO NOT
have this "meta" level information present, and work quite well without
it. In the same way that DEFMACRO's may be elided from the runtime
environment, one may also elide DEFSTRUCT's (and DEFSUBST's and even
probably most DEFTYPE's) -- without any additional "meta" level
considerations -- typically by use of eval-when, defsystem, or what-not.
Compare the "conventional computer languages" world [my apologies for
invoking the "C" word here]; are the struct definitions parsed by the
compiler "saved" in the A.OUT for, say, hello-world?
The forces that Gregor referred to surely lie in the realm of an
existing body of DEFSTRUCT users who cannot continue their "lean
and mean" applications if the addition of CLOS to the language
requires DEFSTRUCT to become a heavyweight. [Yes it would still be
a "heavyweight" even if some vendor invested the energy to figure
out some *non-standard* interface to delete all the meta realm after
having built up the images by "saving" it.] The issue is one of
defaults -- and for persons like yourself, switching to DEFCLASS
is probably much easier than requiring all the industrial-strength
applications to (1) switch to the non-existent vendors who are
already selling this sort of structure-class shakedown, and (2)
reconfigure all their defstruct code to make use of the proprietary
extensions that do the shakedown.
-- JonL --
P.S. A more productive avenue of lobbying in this case might be to get
the vendors to continue waleing away at SLOT-VALUE optimizations.
Technical Details
Message-ID:
<9104180101.AA14513@kuwait>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!tut.cis.ohio-state.edu!unreplyable!garbageReferences:
<2880914762-3910514@Gilgamesh>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!tut.cis.ohio-state.edu!unreplyable!garbage From: jonl%kuwait@LUCID.COM (Jon L White) Newsgroups: comp.lang.clos Subject: SLOT-VALUE and structures Message-ID: <9104180101.AA14513@kuwait> Date: 18 Apr 91 01:01:08 GMT References: <2880914762-3910514@Gilgamesh> Sender: welch@tut.cis.ohio-state.edu Distribution: inet Organization: CommonLoops Lines: 51