Re: [pro] Initialization of shared slots

2011-01-06 Thread Daniel Weinreb
Daniel Weinreb wrote: This conversation has been good.  I agree with both Svante and Scott. As is often the case with the spec, it is not quite unambiguous. Oh, and I meant to say that I'm not sure the spec is 100% clear on which forms are evaluated v. not evaluated, and whether there

Re: [pro] Initialization of shared slots

2011-01-06 Thread Didier Verna
Daniel Weinreb wrote: > This conversation has been good. Yup. Here's what I gather from it, mostly: - a shared slot's initform is required to be evaluated when the class is created, - however, nothing tells us that the resulting value is used immediately to initialize the slot (it could ju

Re: [pro] Initialization of shared slots

2011-01-06 Thread Svante Carl v. Erichsen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Am 06.01.2011 13:56, schrieb Martin Simmons: > On Thu, 06 Jan 2011 10:33:43 +0100, Svante Carl v Erichsen said: >> Am 06.01.2011 01:31, schrieb Scott L. Burson: >>> In section 7.1 it says: "The :initform for a shared >>> slot may be used when defi

Re: [pro] Initialization of shared slots

2011-01-06 Thread Daniel Weinreb
This conversation has been good. I agree with both Svante and Scott. As is often the case with the spec, it is not quite unambiguous. It seems to me that the spec is having trouble deciding whether it is a real, strict, firm language spec, or a useful tutorial/reference documentation aimed at wh

Re: [pro] Initialization of shared slots

2011-01-06 Thread Martin Simmons
> On Wed, 05 Jan 2011 16:17:09 +0100, Didier Verna said: > > Until now, I've been uncounsiously relying on something that the > standard does not seem to specify: the fact that shared slots equipped > with an initform are initialized before the first instance is created: > > (defclass test

Re: [pro] Initialization of shared slots

2011-01-06 Thread Martin Simmons
> On Thu, 06 Jan 2011 10:33:43 +0100, Svante Carl v Erichsen said: > > Am 06.01.2011 01:31, schrieb Scott L. Burson: > > In section 7.1 it says: "The :initform for a shared > > slot may be used when defining or redefining the class." > > I think that this is the most directly applying passage

Re: [pro] Initialization of shared slots

2011-01-06 Thread Martin Simmons
> 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

Re: [pro] Initialization of shared slots

2011-01-06 Thread Martin Simmons
> 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

Re: [pro] Initialization of shared slots

2011-01-06 Thread Svante Carl v. Erichsen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Am 06.01.2011 01:31, schrieb Scott L. Burson: > In section 7.1 it says: "The :initform for a shared > slot may be used when defining or redefining the class." I think that this is the most directly applying passage for this issue. I am not entir

Re: [pro] Initialization of shared slots

2011-01-06 Thread Didier Verna
"Scott L. Burson" wrote: > Oh, and this appears to be a bug in ABCL, since the second passage I > quoted above _requires_ the :initform to be evaluated at defclass > time. That's a good point. -- Resistance is futile. You will be jazzimilated. Scientific site: http://www.lrde.epita.fr/~di

Re: [pro] Initialization of shared slots

2011-01-06 Thread Didier Verna
"Svante Carl v. Erichsen" wrote: > from chapter 7.1.4: > > "If a slot has both an :initform form and an :initarg slot option, and > the initialization argument is defaulted using :default-initargs or is > supplied to make-instance, the captured :initform form is neither used > nor evaluated."