ReadWriteStream Issues

Anthony Adachi adachipro at yahoo.com
Tue May 6 06:05:31 UTC 2003


Earlier I wrote:

>   Or am I missing something hear? 
(I meant to say "here", by the way)
 
 Richard A. O'Keefe wrote:

>  Yes. What you are missing is that the Stream
hierarchy is a couple
>  of decades overdue for refactoring. 

Okay, that speaks volumes. The picture is staring to
become clearer now. I made the opposite assumption:
because the many of the standard classes are a couple
of decades old they have been refactored and refined
to a state of near perfection and equilibrium. 

>  It would actually make more sense
>  for ReadWriteStream to inherit from ReadStream; 

I agree. When I was first looking at the WriteStream
to ReadWriteStream hierarchy and their descendants I
was confused as to why this parent-child arrangement
was chosen. I assumed there must of been some really
good reason for this. Of which I could not see and was
simply not able to recognize it's brilliance.

>there are lots of methods
>  inherited by WriteStream but not actually useful to
it, just so that
>  ReadWriteStream can inherit them.

Hmm... More confusion for readers like myself who are
new to Squeak. Less clutter and more clarity would be
good for all.

>  If we suppose that someone thought it really
mattered for a WriteStream
>  to always appear to be #atEnd, so that nobody
_tried_ reading from it
>  even if they thought it was an input stream, then
we have to explain
>  why whoever implemented #on:from:to: for
WriteStream thought it
>  *didn't* matter.

It sounds like to me that a larger refactoring is in
order. As you suggest a rearrangement of whom inherits
from what might to lead to cleaner, easier to
understand system. An opportunity, to get rid of those
rather useless methods you cite.

Anthony

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Squeak-dev mailing list