<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 4, 2015 at 5:01 AM, Jean-Claude Beaudoin <span dir="ltr"><<a href="mailto:jean.claude.beaudoin@gmail.com" target="_blank">jean.claude.beaudoin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 4, 2015 at 4:54 AM, Kenneth Tilton <span dir="ltr"><<a href="mailto:ken@tiltontec.com" target="_blank">ken@tiltontec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Aug 4, 2015 at 3:55 AM, Jean-Claude Beaudoin <span dir="ltr"><<a href="mailto:jean.claude.beaudoin@gmail.com" target="_blank">jean.claude.beaudoin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Aug 3, 2015 at 10:12 PM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>My read of the spec is that either
behaviour is allowable.<br>
<br></div></div></blockquote></span><div><br>The two behaviors are so different that I have a hard time accepting this.<br></div></div></div></div></blockquote><div><br></div></span><div>The issue is not the degree of behavior difference, the issue is the degree to which the language of the spec constrains an implementor.</div><div><br></div>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.</div><span></span><span></span></div></div>
</blockquote></div><br></div></span><div class="gmail_extra">It seems that Peter and I both missed it somehow. </div></div></blockquote><div><br></div><div>I missed it, too, the first 2-3 times. Then I happened to look back at the section and there it was as plain as day. Perception is like that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">That clears the issue pretty clearly;<br></div><div class="gmail_extra">clisp wins and all the others, well...<br></div></div></blockquote><div><br></div><div>No, CLisp loses (a little*).</div><div><br></div><div>In the dynamic environment of the execution of your top-level (make-bar) example the variable serial-no is unbound, so evaluating the initform (incf serial-no) should fail as you documented.</div><div><br></div><div>The CLisp source is available, AFAIK. I suspect we would discover that the initform is implemented as an anonymous function that closes over the lexically available serial-no at definition time, and that the :include option does not copy the slot <i>definition</i> and then proceed with struct compilation*, instead it copies the compilation* and hence the same closure over the same serial-no.</div><div><br></div><div>* Probably relevant: Clisp is interpreted.</div><div><br></div><div>-hk</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br></div><div class="gmail_extra">Thank you very much Ken for pointing this key sentence.<br><br>Case closed. <br><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Kenneth Tilton</div><div dir="ltr">54 Isle of Venice Dr<br><div>Fort Lauderdale, FL 33301</div><div><br></div><div><a href="mailto:ken@tiltontec.com" target="_blank">ken@tiltontec.com</a></div><div><a href="http://tiltontec.com" target="_blank">http://tiltontec.com</a><br></div><div><span style="font-size:12.8000001907349px">@tiltonsalgebra</span><br></div><div><br></div><div>646-269-1077</div><div><br></div><div>"In a class by itself." <i>-Macworld</i></div><div><br></div><div><br></div></div></div></div></div></div>
</div></div>