[Cuis-dev] Stream hierarchy
H. Hirzel
hannes.hirzel at gmail.com
Fri Mar 21 09:26:59 PDT 2025
On 20/03/2025 1:07 am, Weslleymberg Lisboa wrote:
> It seems my confusion with ReadWriteStream is not totally unfounded.
>
> We have 16 references to ReadWriteStream in the base image and it
> seems its instances are really being used for mixed reading and
> writing. So removing it will require a good amount of refactoring.
>
Yes, and that probably needs to be done step by step, three easy
candidates for replacing ReadWriteStream with ReadStream are
If I go for class references for ReadWriteStream I find in position 3 and 4
Smalltalk internalizeChangeLog
which only reads
SourceFiles at: 2 put: (ReadWriteStream with: aFile
contentsOfEntireFile).
and
Smalltalk internalizeSources
the same.
The class DataStream has
streamedRepresentationOf: anObject
| file |
file := (ReadWriteStream on: (ByteArray new: 5000)).
(self on: file) nextPut: anObject.
^file contents
For the rest it is not so straightforward to see what is happening.
--Hannes
More information about the Cuis-dev
mailing list