<div dir="auto">There is another question: do you need read write stream at all? Most usages in Squeak base image were useless, i mean did not require mixed reads and writes.<div dir="auto"><br></div><div dir="auto">Nicolas</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le mar. 18 mars 2025, 13:46, Gerald Klix via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We neither have traits nor multiple inheritance.<br>
I often missed it. Clearly I reasonable inheritance hierarchy<br>
would inherit ReadStream and WriteStream from PositionableStream<br>
and ReadWriteStream from both.<br>
<br>
<br>
Just my 0.02 CHF,<br>
<br>
Gerald<br>
<br>
<br>
On 3/18/25 1:16 PM, Weslleymberg Lisboa via Cuis-dev wrote:<br>
> Hi,<br>
><br>
> One thing that bugs me a lot is how the Stream hierarchy is defined. Why is ReadWriteStream a subclass of WriteStream where all the methods for reading have to be reimplemented and duplicated from ReadStream?<br>
><br>
> I've read the corresponding chapter in the Blue Book but it just describes the classes, doesn't explain why it's done this way.<br>
><br>
> The way I see it, it makes more sense that ReadStream and WriteStream be more specialized Streams which subclass ReadWriteStream and overrides the unneeded methods to raise SholdNotImplement. Like this:<br>
><br>
> Stream<br>
>      PositionableStream<br>
>          ReadWriteStream<br>
>              ReadStream<br>
>              WriteStream<br>
><br>
> What am I missing?<br>
><br>
> I'm not proposing a change or anything like that. It's just that the curiosity to understand this is killing me :)<br>
><br>
> --<br>
> Att.<br>
> Wéslleymberg Lisboa<br>
> Graduado em Sistemas de Informação<br>
> Docente no IFFluminense - Campus Itaboraí<br>
> Ex-Bolsista de IC do Núcleo de Computação Científica (NC2-IFF) - Projeto IFF Aerospace<br>
> Github: <a href="https://github.com/weslleymberg" rel="noreferrer noreferrer" target="_blank">https://github.com/weslleymberg</a><br>
> Tel.: +55 22 99931-2376<br>
><br>
<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank" rel="noreferrer">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>