This is the mail archive of the
mailing list for the Kawa project.
Re: [KAWA] -> Java
- To: chris at bitmead dot com
- Subject: Re: [KAWA] -> Java
- From: Per Bothner <per at bothner dot com>
- Date: 10 Sep 2000 07:41:01 -0700
- Cc: "kawa at sourceware dot cygnus dot com" <kawa at sourceware dot cygnus dot com>
- References: <39B72FF6.3A7E9C9@nimrod.itg.telecom.com.au>
Chris <email@example.com> writes:
> I see that the default way that Kawa translates a module field into Java
> is this...
> public final Binding foo =
> There must be some reason why it does this as opposed to simply
> public Object foo ....
> but I can't see what it is.
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?)
However, if you declare an explicit type, you get a simple fields:
(define foo :: <object> #!null)
A lot of this information is in the Kawa reference manual.
It is admittedly tough reading, but I think worth it.
> Also, why does it make it "final"?
Because it is - when it's indirected via a Binding. (The actual value
stored in the Binding is not final, though.)