This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
<input-port> overloading for automatic stream conversion
- To: kawa at sourceware dot cygnus dot com
- Subject: <input-port> overloading for automatic stream conversion
- From: "Nic Ferrier" <nferrier at tapsellferrier dot co dot uk>
- Date: Wed, 15 Nov 2000 19:57:27 +0000
It seems I'm allways suggesting things like this but here goes:
Would it be advantagous to compile procs with InPort parameters into
overloaded methods like this:
(define (some-proc arg1 :: <input-port>)
=>
public void someProc(gnu.mapping.InPort arg1)
{
.
.
.
}
public void someProc(java.io.Reader arg1)
{
someProc(new gnu.mapping.InPort(arg1));
}
public void someProc(java.io.InputStream arg1)
{
someProc(new gnu.mapping.InPort(arg1));
}
I am using Kawa more and more to quickly define efficient interfaces
to Java code... this would make their inter-operation much easier.
I can see a few things where these sorts of optimizations would be
nice for some of the time but I can also see that it might not be what
all people want all of the time.
Perhaps some sort of pluggable optimization thingy would be usefull
in Kawa... Per? Anything up your sleeve?
Nic