Last call Takashi Kato (30 Jun 2013 07:00 UTC)
Re: Last call Per Bothner (30 Jun 2013 07:46 UTC)
Re: Last call Takashi Kato (30 Jun 2013 08:35 UTC)
Re: Last call Per Bothner (30 Jun 2013 15:47 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:01 UTC)
Re: Last call Per Bothner (30 Jun 2013 17:19 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:47 UTC)
Re: Last call Per Bothner (30 Jun 2013 18:04 UTC)
Re: Last call Takashi Kato (30 Jun 2013 18:29 UTC)
Re: Last call Per Bothner (30 Jun 2013 23:11 UTC)
Re: Last call John Cowan (01 Jul 2013 20:01 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 09:02 UTC)
Re: Last call Takashi Kato (30 Jun 2013 09:30 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 09:54 UTC)
Re: Last call Takashi Kato (30 Jun 2013 10:27 UTC)
Re: Last call Shiro Kawai (30 Jun 2013 11:44 UTC)
Re: Last call Takashi Kato (30 Jun 2013 17:02 UTC)

Re: Last call Takashi Kato 30 Jun 2013 08:36 UTC

On 30/06/2013 09:45, Per Bothner wrote:
 > What is a binary input/output port?  There is no such thing in R7RS.
The latest standard of Scheme (R6RS) defines what input/output port. (So
far R7RS is yet draft state, I know it will be the latest standard
sooner or later, but as long as standard defines it there is such thing
in Scheme world.)

 > I'm not talking ideal/clean design here.  The Java Socket class has
 > two separate methods: getInputStream and getOutputStream.
I'm not sure how Kawa implements ports but if you have Scheme ports
class/interface then can't it be like this?

// InputOutputPort interface
package org.scheme;

// InputPort and OutputPort define read and write methods
public interface InputOutputPort extends InputPort, OutputPort {

}

// SocketInputOutputPort
package org.scheme;

import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class SocketInputOutputPort implements InputOutputPort {

	private InputStream is;
	private OutputStream os;
	private boolean close = false;

	public SocketInputOutputPort(Socket socket, boolean close) {
		is = socket.getInputStream();
		os = socket.getOutputStream();
		this.close = close;
	}
	// implements read and write
}

_/_/
Takashi Kato
E-mail: xxxxxx@ymail.com