From: A.Shumitsky
Subject: Extent of variables in ISLISP and OpenLisp
Date: 
Message-ID: <bo62v2$ghj$1@news.onet.pl>
Hello!

I am looking at OpenLisp implementation of ISLISP language. I have
discovered that the next simple code does not works:

(let ((a 10))
    (defun fun1 ()
        (print a)))

Next, when I am trying to evaluate function "fun1", OpenLisp complains that
the variable 'a' is unbound. It is OK in Common Lisp (I am using CLISP
implementation).
I have found next paragraph in the "ISLISP Working Draft 20.3":
"The bindings established by defining forms may have indefinite extent. Even
in local binding
constructs, bindings might not vanish upon activation end of the prepared
block - if one or more
function objects are created during execution of the prepared block that
contain references to
those bindings, the bindings will have a lifetime equal to the longest
lifetime of those function
objects."
So, my question is, is it implementation issue or such behaviour is required
by ISO standard?

Regards.
AS

From: james anderson
Subject: Re: Extent of variables in ISLISP and OpenLisp
Date: 
Message-ID: <3FA69883.2B377EE9@setf.de>
the spec does say that it is a "violation" for a defining form to not be toplevel.

"A.Shumitsky" wrote:
> 
> Hello!
> 
> I am looking at OpenLisp implementation of ISLISP language. I have
> discovered that the next simple code does not works:
> 
> (let ((a 10))
>     (defun fun1 ()
>         (print a)))
> 
> Next, when I am trying to evaluate function "fun1", OpenLisp complains that
> the variable 'a' is unbound. It is OK in Common Lisp (I am using CLISP
> implementation).
> I have found next paragraph in the "ISLISP Working Draft 20.3":
> "The bindings established by defining forms may have indefinite extent.

which are not the same as the lexically apparent bindings.

>    Even
> in local binding
> constructs, bindings might not vanish upon activation end of the prepared
> block - if one or more
> function objects are created during execution of the prepared block that
> contain references to
> those bindings, the bindings will have a lifetime equal to the longest
> lifetime of those function
> objects."

...
From: Christian Jullien
Subject: Re: Extent of variables in ISLISP and OpenLisp
Date: 
Message-ID: <bo6n2u$uhq$1@news-reader4.wanadoo.fr>
"A.Shumitsky" <·······@op.pl> wrote in message
·················@news.onet.pl...
> Hello!
>
> I am looking at OpenLisp implementation of ISLISP language. I have
> discovered that the next simple code does not works:
>
> (let ((a 10))
>     (defun fun1 ()
>         (print a)))
>
> Next, when I am trying to evaluate function "fun1", OpenLisp complains
that
> the variable 'a' is unbound. It is OK in Common Lisp (I am using CLISP
> implementation).

ISLISP Working Draft 20.3:

4.1 Forms:
...
A toplevel form is a form that is either not lexically nested within another
form or is lexically nested only within one or more progn forms. Special
forms and function application forms at toplevel are called set-up forms. It
is a violation if a defining form is not a toplevel form.



> So, my question is, is it implementation issue or such behaviour is
required
> by ISO standard?
>

required by ISO standard?

Christian