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: A few questions


On 22 Mar 2001, Per Bothner wrote:

> Stig Erik Sandoe <stig@ii.uib.no> writes:
>
> > Is it hard to change this or will something probably break?
>
> Probably, but we can probably implement something.  Note a static module
> has no run method - the "body" is handled by the class initializer.
>
> There are design issues in how this "should" be done I'm not sure
> about.
>
> Part of the problem is that the module feature is used for two
> different things:  defining Java-compatible classes with a
> predictable and natural encoding, and defining Scheme modules.
> This was perhaps not a great idea.

I have not looked closely at the internals yet, but I think I need
Java-compatible classes, but I am unsure how much work this will be,
do you have an educated estimate? :-)

> > I could unfortunately not find a good way to define my own
> > constructor for such a class, is this planned for the upcoming
> > DEFINE-CLASS mentioned in the docs?
>
> Yes.  I want to implement something similar to the module system
> used in Guile (I believe called GOOPS), which is based on CLOS.

I am not too familiar with GOOPS, but I know Tiny-CLOS and CLOS.  Do
you know when you plan to add GOOPS and what extra support
is needed in Kawa to support it?  It seems to have some constructs
like procedure->memoizing-macro, procedure->macro which I don't know
whether is in Kawa.

> > Is there a way to define java interfaces currently in Kawa?
>
> No.  It has limited usefulness, since you can't associate any
> actions with an interface.

True, but expressing interfaces as lists which are easily generated
by lispy languages is for me preferable to writing it in java.  But
I can probably piece something together.

> The planned define-class will work by generating both an interface
> and a (hidden implementation) class.  (There will be an option to
> generate a class, but the default will be to generate an interface.)

This sounds reasonable.

> > I've noticed DEFMACRO in the docs and have seen that it is a wrapper
> > for DEFINE-SYNTAX.  Coming from Common Lisp I feel that I want a
> > MACRO-EXPAND, is there a MACRO-EXPAND or similar for
> > DEFMACRO/SYNTAX-RULES?
>
> Why do you want it?  It is not clear that macro-expand makes sense for
> syntax-rules, since the result would contain re-named identifiers
> that only make sense in context.  For defmacro, as well as CommonLisp
> (and Emacs Lisp) macro-expand is reasonable, and will probably be
> added.

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.

------------------------------------------------------------------
Stig Erik Sandoe     stig@ii.uib.no    http://www.ii.uib.no/~stig/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]