This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: set! problem
- To: Daniele Maraschi <maraschi at lirmm dot fr>
- Subject: Re: set! problem
- From: Per Bothner <per at bothner dot com>
- Date: 04 Jul 2000 21:05:29 -0700
- Cc: Kawa Mailing List <kawa at sourceware dot cygnus dot com>
- References: <395CB0AF.CEC5A099@lirmm.fr>
Daniele Maraschi <maraschi@lirmm.fr> writes:
> I found something not very conformed to Standard Scheme:
>
> [daniele@einstein kawa]$ java kawa.repl
> #|kawa:1|# (set! a 5)
> #|kawa:2|# a
> 5
> #|kawa:3|#
This is totally conformant to Standard Scheme. Please read the last
paragraph of R5RS section 5.2.1 "Top level definitions".
> I think probably I should get an error if I modified a variable
> that I haven't define before!!
In principle, I agree that might be better. However, there are some
complications involving interactions between Emacs Lisp (and Common
Lisp) that complicate this. (Basically, both ELisp and Common Lisp
allow you to setq a variable without defining it. I am not really
happy with how Kawa handles variables bindings, now that we have to
deal with three languages, where two have separate variable and
function name-spaces. The current implementation is a bit kludgy, but
it works well enough for now.)
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/