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: multiple instances of modules


Dennis <dennis@illusions.com> writes:

> Section 9.7 mentions "instance modules" that have a public default
> constructor. What would that look like? I know what that is in Java, but
> in Kawa, what does it look like?

Hm.  In the latest version, I'm don't think you *can* specify
actions at constructor time.  Instead, the actions in top-level
expressions are executed by run.  For example:

(define a (make <foo>))  ;; For a compiled module foo.scm
(invoke a 'run)

This is useful in some circumstances,
but not perhaps when you just want to make a class.  This is a
somewhat recent change, and I think I need to rethink it.

What I am getting convinced is that I shouldn't put off implementing
define-class much longer.  I'll make this top priority.

> Must 'module-name' be used?

No - if you don't use module-name, a default name is picked depending
on compilation flags and the source file name.
-- 
	--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]