[Pharo-project] String printOn: / storeOn:

Chris Cunningham cunningham.cb at gmail.com
Tue Jun 5 16:33:37 EDT 2012


On Tue, Jun 5, 2012 at 12:53 PM, Camillo Bruni <camillobruni at gmail.com> wrote:
> I think that printing on streams could be improved by changing String >> #printOn: to
>
> printOn: aStream
>        aStream nextPutAll: self
>

Ah, but if you change it to this, then

       String streamContents: [ :s| s print: 'an Object']
equals:
       String streamContents: [ :s| s print: Object new ]

That is, from the printed version, you can't tell which one is
actually a string.  Which could get weird in Inpsectors.

-Chris




More information about the Pharo-dev mailing list