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: module extension


mgd@swarm.org (Marcus G. Daniels) writes:

> I'm not sure I understand.  In the previous example, suppose that
> TestbaseSimple's constructor had an "int foo" argument.  Why wouldn't
> syntax like "(make <testSimple> 1)" be adequate?

Because that is the Kawa syntax for 'new testSimple(1)' and hence ambiguous.
You could do:

(define (<init>) (super 1))

but I'm not all that thrilled by that syntax.

One option is to change things so that actions done at top level of
a module are done by the constructor.  You could add some mechanism
to the super-constructor.  But would this loose flexibility (power)
in possibly preventing mutually recursive modules?
-- 
	--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]