[squeak-dev] #streamContents: on OrderedCollection broken?

David T. Lewis lewis at mail.msen.com
Mon May 26 12:59:07 UTC 2014


On Mon, May 26, 2014 at 08:15:32AM -0400, David T. Lewis wrote:
> On Mon, May 26, 2014 at 02:56:20AM -0700, Marcel Taeumel wrote:
> > Should this work?
> > 
> > OrderedCollection streamContents: [:result |
> > 	result nextPutAll: #(a b c) asOrderedCollection].
> > 
> 
> It certainly looks like it should work.
> 
> Camillo Bruni addressed this case in Pharo by intoducing #streamSpecies, which
> seems like a reasonable approach.
> 
> Discussion was here: http://forum.world.st/WriteStream-nextPutAll-OrderedCollections-td4634624.html
> 

I tried the Pharo change in Squeak. It is a seemingly small change, but it breaks
WriteStreamTest>>testStreamContentsPositioning, which is a serious failure. I think
this means that an important performance optimization for String>>streamContents
would be broken. Pharo probably does not have that optimization, so the problem
would not be noticed there.

Dave



More information about the Squeak-dev mailing list