[Cuis-dev] Stream hierarchy
Juan Vuletich
juan at cuis.st
Wed Mar 19 07:03:02 PDT 2025
On 3/18/2025 11:13 AM, Nicolas Cellier via Cuis-dev wrote:
> 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
This. I never really got ReadWriteStream. I'd be happier if we could
just remove it.
>
> Le mar. 18 mars 2025, 13:46, Gerald Klix via Cuis-dev
> <cuis-dev at lists.cuis.st <mailto: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 <mailto:Cuis-dev at lists.cuis.st>
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250319/e675be9b/attachment.htm>
More information about the Cuis-dev
mailing list