The assumption was that a Smalltalk literal would print itself as a Smalltalk literal. I can't tell if this is a vital feature, and we also have storeOn:... But I can tell you're gonna break a lot of expectations. What are you looking for? Something like C++stream << aString ? Keith Hodge added such support Stream>> << items items putOn: self. ^ self Stream>>putOn:aStream ^aStream nextPutAll: self. Or is it something else? Nicolas 2012/6/5 Camillo Bruni <camillobruni@gmail.com>:
On 2012-06-05, at 22:33, Chris Cunningham wrote:
On Tue, Jun 5, 2012 at 12:53 PM, Camillo Bruni <camillobruni@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 Inspectors.
true :) but the inspector mostly works on the real object so I wouldn't care too much about that :)