[Cuis-dev] Stream hierarchy
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Mar 18 07:13:13 PDT 2025
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.
Nicolas
Le mar. 18 mars 2025, 13:46, Gerald Klix via Cuis-dev <
cuis-dev at lists.cuis.st> a écrit :
> We neither have traits nor multiple inheritance.
> I often missed it. Clearly I reasonable inheritance hierarchy
> would inherit ReadStream and WriteStream from PositionableStream
> and ReadWriteStream from both.
>
>
> Just my 0.02 CHF,
>
> Gerald
>
>
> On 3/18/25 1:16 PM, Weslleymberg Lisboa via Cuis-dev wrote:
> > Hi,
> >
> > 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?
> >
> > 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.
> >
> > 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:
> >
> > Stream
> > PositionableStream
> > ReadWriteStream
> > ReadStream
> > WriteStream
> >
> > What am I missing?
> >
> > I'm not proposing a change or anything like that. It's just that the
> curiosity to understand this is killing me :)
> >
> > --
> > Att.
> > Wéslleymberg Lisboa
> > Graduado em Sistemas de Informação
> > Docente no IFFluminense - Campus Itaboraí
> > Ex-Bolsista de IC do Núcleo de Computação Científica (NC2-IFF) - Projeto
> IFF Aerospace
> > Github: https://github.com/weslleymberg
> > Tel.: +55 22 99931-2376
> >
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250318/3b30f601/attachment.htm>
More information about the Cuis-dev
mailing list