[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Common Lisp Types



    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