[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
STYPES
- To: srt@UCLA-LOCUS
- Subject: STYPES
- From: Jonathan A Rees <JAR@MIT-MC>
- Date: Fri ,15 Feb 85 17:33:00 EDT
- Cc: t-users@YALE.ARPA
- In-reply-to: Msg of Thu 14 Feb 85 16:45:52 PST from Scott Turner <srt at UCLA-LOCUS>
Date: Thu, 14 Feb 85 16:45:52 PST
From: Scott Turner <srt at UCLA-LOCUS>
Never mind. I found STRUCTURE-TYPE (under "Debugging Primitives"), which
means, however, that we aren't supposed to use it in normal programming.
Is there a more acceptable way of getting this information?
As I believe it says in the manual, STRUCTURE-TYPE can't be a
non-"meta"-operation since it violates data abstraction. E.g. a client
of a package could surreptitiously forge that package's structures, so
that a reimplementation of the package might screw such clients.
However, it would make sense to define generic operations on your
structures, if there were a released way to do that. I think that the
next edition of the manual will have to document DEFINE-METHODS since
it's so difficult to live without it. It is a pretty poor interface,
and that's why it hasn't been released before, but...
So you could do something like:
(define-methods handle-foo
((get-stype self) foo-stype)
...)
and define GET-STYPE methods for any structure type which you wanted
clients to be able to concretize.
Jonathan