[parenscript-devel] top-level LET and LET* will not create global variables
Yakov Zaytsev
yakov at clickgrab.net
Thu May 17 21:48:34 UTC 2012
Is this expected?
CL-USER> (ql:quickload "parenscript")
...
CL-USER> (defpackage :ps-user (:use :cl :ps))
#<The PS-USER package, 0/16 internal, 0/16 external>
CL-USER> (in-package "PS-USER")
#<The PS-USER package, 0/16 internal, 0/16 external>
PS-USER> (ps (let ((s-a))))
"(function () {
var sA = null;
return null;
})();"
Also,
$ cat foo.lisp
(let ((s-a))
(+ s-a 42)
(chain s-a (append-child foo)))
PS-USER> (ps-compile-file "foo.lisp")
"(function () {
var sA = null;
sA + 42;
return sA.appendChild(foo);
})();
"
PS-USER>
Which is against documentation "Top-level LET and LET* forms will create
new global variables, or overwrite the values of already existing global
variables with the same name."
Please comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20120518/04baa5a2/attachment.html>
More information about the parenscript-devel
mailing list