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]

kawa module and slib support checked in


I've checked into cvs some new features I'm pretty exceited about, and
that I think you will appreciate, namely support for namespace
management and modules, as well as some imported Slib modules.
Neither of these features are "done", and there is no documentation
except the NEWS file, but the adventurous among you may want to give
them a spin.

Do note that for now you must compile a module, you cannot just load
it.

The basic idea is that a module can be any class that has a default
constructor (or all of whose fields and methods are static); the
public fields and methods of such a class are its exported
definitions.  Compiling a Scheme file produces such a module.  Doing:
	(require <classname>)
will create an anonymous instance of <classname> (if needed), and add
all its exported definitions to the current environment.  Note that if
you import a class in a module you are compiling, then an instance of
the module will be created at compile-time, and imported definitions
are not re-imported.

The define-private keyword creates a module-local definition.

The syntax:
	(require 'keyword)
is syntactic sugar for (require <classname>) where the classname is
find is a "module catalog" (currently hard-wired in
gnu/kawa/slib/SLib.java).  This provides compatibility with Slib.  The
Slib "features" gen-write, pretty-print, pprint-file, and printf are
now available in Kawa; more will be added, depending on time and
demand.  See the package directory gnu/kawa/slib for what is
currently available, and examples, as the SLib is an example of
the Kawa module system in action.
-- 
	--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]