Proper behavior of slot-initforms in defstruct?

Kenneth Tilton ken at tiltontec.com
Tue Aug 4 08:54:26 UTC 2015


On Tue, Aug 4, 2015 at 3:55 AM, Jean-Claude Beaudoin <
jean.claude.beaudoin at gmail.com> wrote:

>
>
> On Mon, Aug 3, 2015 at 10:12 PM, Peter Stirling <peter at pjstirling.plus.com
> > wrote:
>
>> My read of the spec is that either behaviour is allowable.
>>
>>
> The two behaviors are so different that I have a hard time accepting this.
>

The issue is not the degree of behavior difference, the issue is the degree
to which the language of the spec constrains an implementor.

Did Peter miss this, or am I missing something completely (I am just a
simple application programmer): "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 the constructor function
appears.

-kt

-- 
Kenneth Tilton
54 Isle of Venice Dr
Fort Lauderdale, FL 33301

ken at tiltontec.com
http://tiltontec.com
@tiltonsalgebra

646-269-1077

"In a class by itself." *-Macworld*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20150804/ce5247f6/attachment-0001.html>


More information about the pro mailing list