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 17:01 UTC

On 30/06/2013 17:47, Per Bothner wrote:
 > For an input/output port there are two positions - because there are
 > actually two separate ports.
I disagree with this. It seems the point is mixed up with Java's problem
and how port should be. IMO input/output port doesn't have to (or even
must not) have two positions and it is one port. (At least I implemented
it like this in Sagittarius.)

 > One could so that, but that means causes compatibility problems with
 > the Java I/O classes.  InputStream/OutputStream/Reader/Writer are
 > all classes, not interfaces, so you can't multiply inherit them.
IMO this is a big mistake of Java. (well this is not the topic what I
want to discuss but just wanted to say.)

 > Obviously it is possible to implement InputOutputPort in Java,
 > as you show.  (I had to make some contortions to deal with binary
 > ports.)However, the concept is inherently bogus, so it would be
 > a mistake to do so.
If Java's stream and Scheme's port are the same yes, but if it's
different I don't think so, and I think (at least with this case) it
should be different because of the Java's limitation. And I believe
converting port to stream (or reader/writer) is not so difficult.

 > If you want an object that bundles both an input port and an
 > output port, then use the socket directly.  That is what
 > C# does - it doesn't even let you (directly) get the two
 > streams, but you call Send/Receive directly on the Socket.
For this, removing 'socket-port' is an option. As long as
implementations support custom port, then converting socket to port is
not so difficult. The purpose of this procedure is actually convenience
and reducing implementation dependent layer.

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