WriteStream class extend [
    onSpecies: aSpecies [
        ^self on: (aSpecies new: 8)
    ]
]

?  Since collection species needs to support #new: anyway....

What about instead

ArrayedCollection class extend [
    writeStream [
        ^WriteStream on: (self new: 8)
    ]
]

As in "Array writeStream"? Actually, there is SequenceableCollection class>>#streamContents: too, which is what you were looking for. I am moving it to ArrayedCollection, since those are the collection for which the current implementation works.

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to