That is not an internal definition. This is an internal definition:<div><br></div><div>(define (foo x)</div><div> (define i 10)</div><div> (define j 12)</div><div> (+ x i j))</div><div><br></div><div>It is preferred because there is no right-ward shift and it unifies the top-level more with local definition contexts---which in my mind is good for understanding and copy/pasting it.</div>
<div><br></div><div>The only reason you wouldn&#39;t like it, IMHO, is when you would use a let* that re-binds:</div><div><br></div><div>(let* ([x 2] [x (+ x 4)] ...)</div><div><br></div><div>!=</div><div><br></div><div>(define x 2) (define x (+ x 4)) ...</div>
<div><br></div><div>It would be nice if we had a define* like define-package has.</div><div><br></div><div>Jay</div><div><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 9:50 PM, Jordan Schatz <span dir="ltr">&lt;<a href="mailto:jordan@noionlabs.com">jordan@noionlabs.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">From Racket v5.2 release notes:<br>
<br>
&gt; Internal-definition expansion has changed to use let* semantics for<br>
&gt; sequences that contain no back references. This change removes a<br>
&gt; performance penalty for using internal definitions instead of let in<br>
&gt; common cases, and it only changes the meaning of programs that capture<br>
&gt; continuations in internal definitions. Internal definitions are now<br>
&gt; considered preferable in style to let.<br>
<br>
I&#39;m not sure that I understand, but if I have it figured out then this:<br>
<br>
(define (foo x)<br>
  (local [(define i 10)<br>
          (define j 12)]<br>
         (+ x i j)))<br>
<br>
Is now considered better style then this?<br>
<br>
(define (foo2 x)<br>
  (let ([i 10]<br>
        [j 12])<br>
    (+ x i j)))<br>
<br>
Why?<br>
<br>
Shalom,<br>
Jordan<br>
_________________________________________________<br>
  For list-related administrative tasks:<br>
  <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jay McCarthy &lt;<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>&gt;<br>Assistant Professor / Brigham Young University<br><a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>&quot;The glory of God is Intelligence&quot; - D&amp;C 93<br>
</div>