This is the mail archive of the kawa@sources.redhat.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: [KAWA] -> Java


Chris <chrisb@nimrod.itg.telstra.com.au> writes:

> Per Bothner wrote:
> 
> > One reason is that would make it more-or-less impossible to implement
> > correct Scheme sematics.  (What if multiple source files define
> > the same variable, which is legal?)
> 
> I see, so if you declare the same variable in several source files they
> need to refer to the same variable.

Yes.  I'm not so interested if multiple modules define the same
variable (which is at the very least bad style, I feel).  However, we
must handle a function in module A referencing variable X, which is
defined in module B, even in the case of module A being loaded before
module B.  A simple solution is to always d an environment lookup when
a variables is refences or set.  However, Kawa tries to be more
clever, and does the environment lookup when the module is loaded.  Of
course you cannot lookup of the *value* then (since the value may
change); instead when the module is loaded, Kawa resolves the variable
name to a "Binding" object, which is an Object that *contains* the
value if the variable is bound - or *will* contain the value as soon
as it does get bound.

> The problem I have is whether kawa modules are designed as a mechanism
> to interface with the Java world, or whether they are a system to
> support nice scheme code.  From reading the manual, I got the impression
> that it was purely the former.

It is definitely both.
-- 
	--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]