This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: A few questions
- To: Per Bothner <per at bothner dot com>
- Subject: Re: A few questions
- From: Stig Erik Sandoe <stig at ii dot uib dot no>
- Date: Fri, 23 Mar 2001 19:27:29 +0100 (MET)
- cc: <kawa at sourceware dot cygnus dot com>
On 22 Mar 2001, Per Bothner wrote:
> Stig Erik Sandoe <stig@ii.uib.no> writes:
[map Scheme -> Java classes]
> One variant is that we only add a "run" method when neither module-extends,
> module-implements, and module-static are specified. A possible
> refinement is to add an implicit "run" if the module implements Runnable,
> and no run method is specified. (The idea is that modules by default
> implement Runnable. Currently that is only if they don't extend
> MdouleBody, because the run method has the wrong return type, but
> that should be fixed.)
I was hoping to use the generation of java classes to allow them to
extend existing java classes, and specify the behaviour of the
constructor which might include e.g a private _run() method and
calling of parent constructors with certain arguments. In other
words module-implements and module-extends should not impose a
protocol of run() as this may run contrary to e.g specifying EJBeans
in Scheme or in other situations where the protocol is defined to
use a constructor.
> > I am not too familiar with GOOPS, but I know Tiny-CLOS and CLOS. Do
> > you know when you plan to add GOOPS
>
> When I get time or I get suitable patches.
ok.
[snip CLOS-related plans I need to think and experiment with to say
something useful]
> > I guess it is an old habit and when writing macros and use them it
> > might be nice to see that the correct code is generated. I am not
> > sure how this is usually done in Scheme.
>
> I've discussed this issue in private. Matthias Radestock suggested:
> (define t (make <kawa.lang.Translator>))
> (invoke t 'rewrite '(some-expr))
> You can probably do a better CommonLisp-style macroexpand-1
> using the expand method in Macro.
Ok, thanks for the pointer. :-)
------------------------------------------------------------------
Stig Erik Sandoe stig@ii.uib.no http://www.ii.uib.no/~stig/