[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: marchett%cod@NOSC.ARPA, common-lisp@SU-AI.ARPA
- Subject: slotp
- From: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>
- Date: Thu, 17 Apr 86 23:57 EST
- In-reply-to: <8604171608.AA25949@cod.ARPA>
Date: Thu, 17 Apr 86 08:08:14 PST
From: David J. Marchette <marchett%cod@nosc.ARPA>
Is there an easy way to tell if an instance variable (or slot) is available
in a particular structure?
What good would it do to have a SLOTP predicate? What operation can you do
on a structure once you know it has such a slot? The point is that you're
not supposed to go around looking for slots by name except maybe in a debugger,
and debuggers are intended to be provided in an implementation-dependent fashion
by each system.
It's a data-abstraction violation to know what a structure calls its slot names.
If you're supposed to be poking about in the structure, the person who authorized
you to do so will have given you the following information: a symbol which can
be used as a second argument to TYPEP to tell if you have one of the structures
in question, a function which creates such structures and/or a set of functions
which will access their slots, and documentation on how to use those accessors
- From: David J. Marchette <marchett%cod@nosc.ARPA>