[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Common Lisp Types
- To: kempf%hplabsc@hplabs.HP.COM
- Subject: Re: Common Lisp Types
- From: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Date: 4 Feb 87 09:39 PST
- Cc: Bobrow.pa@Xerox.COM, RPG@SAIL.STANFORD.EDU, common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: Jim Kempf <kempf%hplabsc@hplabs.HP.COM>'s message of Wed, 4 Feb 87 08:06:25 pst
- Sender: Bobrow.pa@Xerox.COM
From the application programmer's viewpoint, classes for some
of the types listed as not having any would make application
development using CLOS more straightforward. Consider the STREAM
type. If a STREAM class exists, and is subclass-able, then
developing a window system application which can run on a variety
of displays becomes easier, since WINDOW can be a subclass of
STREAM. In this sense, I think Gabrial's proposal is a sound one,
since it increases the integration between the CL type system and
CLOS.
Jim Kempf kempf@hplabs.hp.com
I believe having abstract classes is great. The problem becomes when
the user expects a method to be applicable, but it isn't because the
type (class) system doesn't preserve the appropriate subclass
relationships. For example, will the type (class) system support
(subclassp (class-of #'(lambda(x) x)) (class-named 'function))
If so, then function is a good class; if not, then I think there is
some confusion. If all implementations of stream are such that
(subclassp (class-of *stream-object*) (class-named 'stream))
then stream is a good class.
Thus, I believe in most of what RPG suggested. But we should be careful
not to break the users model of the class system.
danny