Hi Yakov,<div><br></div><div>Yes, that does look inconsistent with the documentation. I use DEFPARAMETER if I need such a variable. <div><br></div><div>Perhaps that line of documentation dates from before Vladimir implemented lexical scoping.</div>
<div><br></div><div>By the way, Vladimir is traveling for a few months and most changes will probably have to wait until he is back.</div><div><br></div><div>Daniel</div><div><br><br><div class="gmail_quote">On Thu, May 17, 2012 at 5:48 PM, Yakov Zaytsev <span dir="ltr"><<a href="mailto:yakov@clickgrab.net" target="_blank">yakov@clickgrab.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is this expected?<br><br><br><br>CL-USER> (ql:quickload "parenscript")<br>...<br>CL-USER> (defpackage :ps-user (:use :cl :ps))<br>
#<The PS-USER package, 0/16 internal, 0/16 external><br><br>CL-USER> (in-package "PS-USER")<br>
#<The PS-USER package, 0/16 internal, 0/16 external><br><br>PS-USER> (ps (let ((s-a))))<br>"(function () {<br><br> var sA = null;<br><br> return null;<br><br>})();"<br><br><br><br>Also,<br><br>$ cat foo.lisp<br>
(let ((s-a))<br> (+ s-a 42)<br> (chain s-a (append-child foo)))<br><br><br>PS-USER> (ps-compile-file "foo.lisp")<br>
"(function () {<br>
<br>
var sA = null;<br>
<br>
sA + 42;<br>
<br>
return sA.appendChild(foo);<br>
<br>
})();<br>
<br>
"<br>
<br>
PS-USER> <br>
<br>
<br>Which is against documentation "<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:'Times New Roman';word-spacing:0px">Top-level<span> </span></span><code style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px">LET</code><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:'Times New Roman';word-spacing:0px"><span> </span>and<span> </span></span><code style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:-webkit-auto;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px">LET*</code><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:'Times New Roman';word-spacing:0px"><span> </span>forms will create new global variables, or overwrite the values of already existing global variables with the same name."<br>
<br>Please comment<br></span>
<br>_______________________________________________<br>
parenscript-devel mailing list<br>
<a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
<a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
<br></blockquote></div><br></div></div>