[squeak-dev] SocketStream not a Stream?

Göran Krampe goran at krampe.se
Tue Nov 2 15:44:59 UTC 2010


Hi!

On 11/02/2010 04:41 PM, Igor Stasenko wrote:
> What makes object to be a stream? Belonging to Stream hierarchy? Apparently not.
> Its a behavior and protocol.

Exactly.

> One of the reasons to make it subclass is to reuse behavior inherited
> from Stream.
> But if subclass needs to override 90%+ of inherited methods, then it
> makes not much sense.
> I didn't measured how much methods need to be overridden by
> SocketStream, but i suspect it is the case, since sockets are quite
> special.

Yes, that is my guess too. And yes, just going by the "is a" test may 
create brittle classes which break when changes are made because they 
really are too different.

regards, Göran




More information about the Squeak-dev mailing list