[Openmcl-devel] DEFSTRUCT and :INCLUDE
ron at flownet.com
Wed Oct 14 16:36:55 UTC 2009
On Oct 14, 2009, at 8:38 AM, james anderson wrote:
> On 2009-10-14, at 10:55 , Tim Bradshaw wrote:
>> On 13 Oct 2009, at 16:43, Daniel Weinreb wrote:
>>> There are two separate questions here: what is the
>>> definition of the Common Lisp language, and what
>>> should CCL do?
>>> Regarding the former, I think I can say pretty reliably
>>> that during the design of CL, nobody thought about
>>> this. So the spec is not written in such a way as to
>>> give unambiguous guidance about what these forms
>>> ought to do.
>> I agree with this. However I think it's clear that, if they had
>> thought about it, they would not have mandated the kind of obscure
>> accidental name-capture that CCL does (and which other
>> may well do as well), if only because it would give the hygienic
>> people cause to poke fun at CL.
>> I think one could argue from this text: "The slot default init forms
>> are evaluated in the lexical environment in which the defstruct form
>> itself appears and in the dynamic environment in which the call to
>> constructor function appears." that CCL (and some other
>> implementations) are wrong. However this is not clear enough since
>> "the defstruct form" needs to be something like "the defstruct form
>> which introduces the init form".
> i do not read the spec to bear this out. while the passage with
> respect to default initargs in 7.1.3 does extend this environment's
> description, as in:
> The default value form is evaluated in the lexical environment of
> the defclass form that supplied it.
> this passage is part of a separate text which discusses the
> interpretation of the default initargs, and does not benefit from
> being in the context of a specification for the interpretation of a
> particular definition form. the analogous passage in the
> specification of the defclass operator does not qualify the
> specification. that is, it suffices with the designation "the
> defclass form". i cannot recall any occasion to have wondered if i
> should even consider this to refer to anything other than the
> lexical context of the respective base class definition form.
I agree with you completely. But read the recent C.L.L. thread on
"DEFSTRUCT and lexical environment" if you want to see the arguments
for the opposing view. They are being advanced with (IMHO) improbable
> one should be able to expect expressions in the language to specify
> coherent behavior.
Yeah, you'd think, wouldn't you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel