[squeak-dev] SocketStream not a Stream?

Ralph Boland rpboland at gmail.com
Tue Nov 2 14:48:55 UTC 2010

Message: 16
Date: Tue, 02 Nov 2010 08:06:11 +0100
From: G?ran Krampe <goran at krampe.se>
Subject: Re: [squeak-dev] SocketStream not a Stream?
To: squeak-dev at lists.squeakfoundation.org
Message-ID: <4CCFB863.1080302 at krampe.se>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> On 11/02/2010 04:55 AM, Andreas Raab wrote:
> > Hi -
> >
> > I (accidentally) noticed that SocketStream isn't a subclass of Stream.
> > Is there any reason why this should remain true? It strikes me as odd as
> > Stream has very few requirements (basically #next, #nextPut:, and
> > #atEnd) which are trivially fulfilled by SocketStream. Anyone seeing a
> > reason not to change this?
> >
> > Cheers,
> > - Andreas

> Well, when I wrote the current version I think I decided against it
> since I did not want any "inherited bugs" so to speak. If a clean and
> useful inheritance is possible, then sure. The other reason it might be
> unwise is that it does both input and output - but of course that does
> not mean a useful inheritance is possible anyway.

> regards, Göran

I don't know anything about SocketStream so my comments may be
way off base.

If SocketStream does both output and input then it sounds like it should
have an instance variable (a Stream) for input and an instance variable
(another Stream) for output.  On the other hand if what you mean by
doing input and output is that is reads and writes to the same place then
it sounds like SocketStream should not only be a subclass of Stream but
a subclass of ReadWriteStream.

Like I said, I don't know anything about SocketStream.


Ralph Boland

More information about the Squeak-dev mailing list