[pro] Initialization of shared slots

Martin Simmons martin at lispworks.com
Thu Jan 6 12:52:19 UTC 2011


>>>>> On Thu, 6 Jan 2011 12:36:48 GMT, Martin Simmons said:
> 
>>>>> On Wed, 5 Jan 2011 16:31:31 -0800, Scott L Burson said:
> > 
> > I think the sentence from 7.1.3 that you've quoted is intended to
> > apply only to local slots; I think these other two passages make that
> > clear by establishing that shared slots are indeed initialized at
> > defclass time.
> 
> I think 7.1.3 is intended to apply to shared slots as well, because 7.1.1
> explicitly states "An initialization argument that initializes a shared slot
> stores its value into the shared slot, replacing any previous value." (though
> don't forget that this only happens when the slot is unbound, i.e. typically
> the first time).

Sorry, forget that -- "initialization argument" here is different from
"initform".

However, 7.1.5 says (about the system-supplied primary method for
shared-initialize) "This method behaves as follows on each slot, whether
shared or local" so I still think 7.1.3 applies to shared slots as well.

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/




More information about the pro mailing list