[Ecls-list] ECL & Closer-mop
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at gmail.com
Mon Nov 26 22:35:35 UTC 2012
On Mon, Nov 26, 2012 at 7:38 PM, Pascal Costanza <pc at p-cos.net> wrote:
> I don't think the HyperSpec allows for that interpretation. The entry for
> slot-value is specific that slot-unbound is called when a slot is unbound,
> and the entry for slot-unbound specifies that the default method signals an
> error of type unbound-slot. There are no exceptions specified for unsafe
> code. This is actually important, since the whole slot-unbound and
> slot-missing protocols can be used to define reasonable semantics, for
> example to define hash-table-based slots, and user code needs to be able to
> rely on the correct workings of user-defined extensions here even for
> unsafe code.
>
As I said, this optimization is taking place only for accessors over
standard classes. In any case I have deactivated it because again we run
into the eternal two problems that cannot be solved without dynamic
recompilation:
1) users might define methods with the same name over their own classes,
even for the accessors that are defined in the CL package.
2) as discussed in the pro mailing list, it is a nightmare to determine the
actual class of an accessor argument -- the type declaration names only the
parent class, but user's subclasses might not fullfil the same contracts as
their parents.
It is really a nightmare trying to introduce any optimization with MOP
around.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121126/a84fccd5/attachment.html>
More information about the ecl-devel
mailing list