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 objects


Dennis <dennis@illusions.com> writes:

> are there any examples of the module facility in use? It is all very fuzzy
> to me at this point. I've read and reread the docs but its not quite
> jelling for me yet.

Well, there are the modules in kawa/lib/*.scm, but they aren't
very interesting.

Somewhat more interesting is module1.scm in the testsuite directory,
which is imported by obj-test.scm.  In this case module1 is "used as
a module", and we don't care exactly how it gets mapped into a Java
class.  If you care about that (either because you will access
the class from Java or because you will explicitly create instances
of the class using (make ...)), then the Kawa manual describes that.
But the basic idea is that top-level definitions become fields and/or
methods of the class.  You need to use the form
        (define (fname arsgs ...) ...)
to define a method fname.
-- 
	--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]