<input-port> overloading for automatic stream conversion
Nic Ferrier
nferrier@tapsellferrier.co.uk
Wed Nov 15 11:57:00 GMT 2000
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
More information about the Kawa
mailing list