From: Kenny Tilton
Subject: Back door to 'slot-value-using-class?
Date: 
Message-ID: <37E607D9.E9FC09E9@liii.com>
I am developing a metaclass which I want to make as clean as and
efficient as possible, and I think that means specializing
'slot-value-using-class (SVUC) on my metaclass to extend the standard
behavior.

But my internals themselves need to read and write slots themselves in a
fashion bypassing the extra processing, and this is not just a matter of
invoking 'call-next-method.

I have a version which creates readers and writers which all call
'my-slot-value, at which point SVUC itself becomes the "backdoor"
access, and that is the one I will soldier on with since the project
(something new) is under time pressure, but I do not like ti for a
couple of reasons and it would be great if i could work around this.

One thing that worked was:

(defun backdoor-slot-value (self esd)
  (slot-value-using-class (find-class 'standard-class)
                           self
                           esd)))


...but when I attempted to do that with another metaclass (ACL's
persistent AllegroStore metaclass) I broke something. I have a Q into
their tech support, but I get the feeling this type of fast-and-loose
might not be something I can expect to be supported.

Of course, I could always set a global....but that scares me...what
happens when we get into multiple threads? I could add a slot to each
instance, but pretty soon I take a performance hit on all slot access.

Well, does anyone know of back door I can use to bypass my own SVUC
specializations?

thx

kenny tilton
clinisys

From: Gary Curtis
Subject: Re: Back door to 'slot-value-using-class?
Date: 
Message-ID: <7satf6$i5p$5@tomm.stsci.edu>
One option is to call clos::slot-value--si directly to bypass
the slot access protocol.

Gary.
--


In article <·················@liii.com>, Kenny Tilton <····@liii.com> writes:
|> I am developing a metaclass which I want to make as clean as and
|> efficient as possible, and I think that means specializing
|> 'slot-value-using-class (SVUC) on my metaclass to extend the standard
|> behavior.
|> 
|> But my internals themselves need to read and write slots themselves in a
|> fashion bypassing the extra processing, and this is not just a matter of
|> invoking 'call-next-method.
|> 
|> I have a version which creates readers and writers which all call
|> 'my-slot-value, at which point SVUC itself becomes the "backdoor"
|> access, and that is the one I will soldier on with since the project
|> (something new) is under time pressure, but I do not like ti for a
|> couple of reasons and it would be great if i could work around this.
|> 
|> One thing that worked was:
|> 
|> (defun backdoor-slot-value (self esd)
|>   (slot-value-using-class (find-class 'standard-class)
|>                            self
|>                            esd)))
|> 
|> 
|> ...but when I attempted to do that with another metaclass (ACL's
|> persistent AllegroStore metaclass) I broke something. I have a Q into
|> their tech support, but I get the feeling this type of fast-and-loose
|> might not be something I can expect to be supported.
|> 
|> Of course, I could always set a global....but that scares me...what
|> happens when we get into multiple threads? I could add a slot to each
|> instance, but pretty soon I take a performance hit on all slot access.
|> 
|> Well, does anyone know of back door I can use to bypass my own SVUC
|> specializations?
|> 
|> thx
|> 
|> kenny tilton
|> clinisys
From: Kenny Tilton
Subject: Re: Back door to 'slot-value-using-class?
Date: 
Message-ID: <37E95BC5.54D1C128@liii.com>
Gary Curtis wrote:
> 
> One option is to call clos::slot-value--si directly to bypass
> the slot access protocol.
> 
> Gary.

Thx, can't believe how many times I apropos'ed slot-value without
spotting that..not that that name jumps right out at you.

But I realize now I was nuts to ask for such a thing, especially since I
am sitting on top of a persistent metaclass..something tells me that is
one protocol i do not want to bypass. :)

I also discovered explicit MOP doc suggesting my little trick...

> |>
> |> (defun backdoor-slot-value (self esd)
> |>   (slot-value-using-class (find-class 'standard-class)
> |>                            self
> |>                            esd)))
> |>

would produce undefined results. And, by the by, I think that should
have been (find-class 'standard-object).

I decided to set a global and get on with my life. :) Thx for the input.

kenny
clinisys