This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Starting a repl within a package
- To: Jost Boekemeier <jostobfe at rambutan dot zrz dot TU-Berlin dot DE>
- Subject: Re: Starting a repl within a package
- From: Per Bothner <per at bothner dot com>
- Date: 02 Apr 2001 11:27:46 -0700
- Cc: kawa at sourceware dot cygnus dot com
- References: <200104021632.SAA19286@rambutan.zrz.TU-Berlin.DE>
Jost Boekemeier <jostobfe@rambutan.zrz.TU-Berlin.DE> writes:
> so far I've been unable to start a repl within some package (say com.my.*).
> It seems that all expressions are evaluated within the package kawa.
Er, no. The Scheme namespace is orthoginal to the Java package system.
> which makes it impossible to access features not exported from my package.
You can do it using the Kawa module system. However, I'm not sure
it makes sense to have the repl in some other package. If you type
an expression that needs to be compiled, it will be compiled into
a class (in the unnamed package) using a special classloader.
it makes sense
> I even tried something like this
>
> (call (object <com.my.x> ((getX ) x)) 'getX)
>
> [or similar] without success.
Well, this worked for me:
(invoke (object (<gnu.lists.FString>) ((getX) 12)) 'getX)
> Another thing, is somebody working on a GOOPS port to kawa?
Slowly. I have a design for something that would be very similar
(but not 100% compatible). The handling of generic functions and
methods is semi-orthoginal to class and fields. There is some
evolving support for generuic methods. The planned design for
classes and fields is in http://www.bothner.com/~per/papers/jaoo99.html
I don't know when I'll have time to work on it - it could be a task
for a volunteer.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/