[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Category Errors
- To: common-lisp-object-system@sail.stanford.edu
- Subject: Re: Category Errors
- From: Jim Kempf <kempf%hplabsz@hplabs.HP.COM>
- Date: Thu, 9 Jul 87 13:25:28 pdt
>
> 1. Let sea of classes/metaclasses remain a miasma and inform
> programmer that he ought not mix things up.
>
> 2. Define a notion of class category or classs level and have a
> category of generic function for each class category.
This is a difficult one, and relates to Patrick's goal of maintaining metaclass
protocol and class protocol orthogonally. Pros are that it can avoid having
programmers make mistakes like defining MAKE-INSTANCE on a class, as cited
in the base note, cons are that a programmer might actually *want* to have
a particular class be instantiated slightly differently. Given Lisp's
tendency to allow a programmer to do anything, as long as the name for
doing it can be found, I think 1) should be the choice, except the "sea
of classes/metaclasses" ought probably to be broken up into little bays
and gulfs via. the package system. With some method names (like MAKE-INSTANCE)
there is no hope, since they are firmly in the programmer interface.
With the rest of the metaobject protocol, the names should be exported
from a seperate package, so that only programmers who want to do metaclass
programming need be concerned with them. One can reasonably argue that
a programmer using CLOS should be familar enough with the programmer
interface functions to be able to avoid an accidental redefinition of
the methods there, but we should certainly not require CLOS programmers
to be familar with metaclass names unless they intend to do metaclass
programming.
Jim Kempf kempf@hplabs.hp.com