Re: [Pharo-users] storeOn:/readFrom: symmetrical?

2014-05-26 Thread Rick Kitts
I wanted to take a second to close the book on this. It turns out that storeOn:/readFrom: are not supposed to be symmetrical. printOn:/readFrom: are supposed to be symmetrical. storeOn: generates a string that can be fed into the interpreter/compiler such that when it is executed an instance

Re: [Pharo-users] storeOn:/readFrom: symmetrical?

2014-05-26 Thread Esteban A. Maringolo
I wouldn't rely on such symmetry. Given the fact #printOn: is the only printing instrumentation available to show objects in debuggers, inspectors, etc. Most of the times it just shows a short representation of the object, not very useful to recreate an instance from such short string. Regards,

Re: [Pharo-users] storeOn:/readFrom: symmetrical?

2014-05-24 Thread stepharo
On 23/5/14 19:58, Rick Kitts wrote: Hi. A basic question I hope someone can answer. This works: — cut here --- | stream aInt | stream := (String new:20) writeStream. aInt := 23. (aInt storeOn:stream) = (aInt class readFrom:(stream contents)) — cut here --- This doesn’t (generates an error):

[Pharo-users] storeOn:/readFrom: symmetrical?

2014-05-23 Thread Rick Kitts
Hi. A basic question I hope someone can answer. This works: — cut here --- | stream aInt | stream := (String new:20) writeStream. aInt := 23. (aInt storeOn:stream) = (aInt class readFrom:(stream contents)) — cut here --- This doesn’t (generates an error): — cut here --- | stream aTime |