This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: set! problem


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]