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

Re: MOP and Inheritance



> How would you propose to generalize SUBTYPEP, so that making it generic
> would be useful?  Unlike TYPEP, it operates only on type "names", rather
> than on random objects.  The current name spectrum only includes symbols
> and and certain list constructs over them; e.g.
>    VECTOR
>    NEW-DEFSTRUCT-KIND
>    (ARRAY SINGLE-FLOAT *)
>    (OR INTEGER FLOAT)
> and so on.

I believe part of the CLOS spec states that class objects are to become
valid wherever Common Lisp currently takes type specifiers. Thus, SUBTYPEP
will have to take classes in addition to symbols and lists in any case.
Making SUBTYPEP generic would allow metaclass programmers to define
their own subtyping relationships, rather than being bound to that
currently in Common Lisp. This could free up the need to specify the
CPL data structure as part of the metaobject protocol, opening up the
the metaobject protocol to supporting implementation of metaclasses with 
radically different kinds of inheritance.

This is not to say that SUBTYPEP *should* be made generic, since, given
the current state of knowledge about how to construct a metaclass kernel,
it's not clear what else might be needed to support implementation of
radically different kinds of inheritance.

		jak