Re: [long answer] Re: copy-object
>I would of course have some raw data associated with
>each of them, which would be used for constructing the
>real object when needed.
>> One possibility is to have a wrapper class with one
>> unbound slot.
>> All GF access this slot.
>> As soon a GF access the slot, the method
>> unbound-slot is called and you
>Does unbound-slot work with structures or just CLOS
>objects? If it works with structures it can be very
>helpful in this kind of "lazy delegation".
I dont think that unbound-slot works with structures, but if you keep the wrapper very simple (no superclass and so on) and if you keep the creation process very simple (under some conditions CLOS objects can be created very fast) the creation of the wrapper should be very fast.
And if you want you can put the raw data in a structure stored in a wrapper slot.
But I would not be surprised if CL have better mechanisms like a lazy delegation for structures :-)
Eric Smith <eric3057@yahoo.com>
Sent by: owner-lisp-hug@xanalys.com 06.03.2002 05:43
|
To: lisp-hug@xanalys.com cc: Subject: Re: [long answer] Re: copy-object |
--- ssekkat@gmx.de wrote:
> If the objects are not instantiated, how do you
> identify them?
I would of course have some raw data associated with
each of them, which would be used for constructing the
real object when needed.
> One possibility is to have a wrapper class with one
> unbound slot.
> All GF access this slot.
> As soon a GF access the slot, the method
> unbound-slot is called and you
Does unbound-slot work with structures or just CLOS
objects? If it works with structures it can be very
helpful in this kind of "lazy delegation".
> can instantiate the slot with the real object.
> That way creating the wrapper should be very cheap
> and the real object is
> instantiated on demand in a cost effective way.
Yes, very elegant, if unbound-slot works with
structures.
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/