2 Mar 2006 17:07
Re: Slots in layers, was Re: ContextL design question...
Pascal Costanza <pc <at> p-cos.net>
2006-03-02 16:07:38 GMT
2006-03-02 16:07:38 GMT
Hi Nick and everyone else, On 28 Feb 2006, at 22:06, Pascal Costanza wrote: > On 28 Feb 2006, at 20:48, Nick Bourner wrote: > >> Thanks for that, I'll give it a try. >> >> Is the value of the slot global or can it be set on a per-thread >> basis >> like active layers? I was thinking that it could be a good way of >> carrying information for a particular activation of a layer. Say, for >> instance, a stream for a display layer to write to or something. Then >> you could have something like >> >> (with-active-layers ((some-layer :some-slot a-value) some-(Continue reading)other- >> layer) >> ...) >> or >> (ensure-active-layer (some-layer :some-slot a-value)) >> >> rather than something like >> >> (let ((*some-special* a-value)) >> (with-active-layers (some-layer some-other-layer) >> .... >> >> Not a whole lot different but I think it just expresses the intent >> slightly more clearly. >
Does anyone know how (or indeed if it is possible) to have a slot
inherit from two different slot definitions, so that the effective
slot definition is the union of the two direct slot definitions.
There's code in section 3.5.2 of AMOP that seems like it would be
possible by making an effective slot definition on the fly using
"make-effective-slot-definition" but that doesn't seem to exist in
SBCL or OpenMCL, or at least it isn't exported from wherever it's
hiding.
I have a suspicion I'm going to have to do this by making one slot
definition a subclass of the other, but something like the AMOP stuff
would sure be handy.
Anyone know for sure?
Thanks,
Nick
RSS Feed