Steph,
There is no convention that establishes a global invariant with respect to
the relationship between ("y := x printString" | "y := x storeString") and
"x class readFromString: y." There is, however, a convention that
establishes a global invariant such that "y := x storeString" should be
reversible using "Compiler evaluate: y."
Many Smalltalk class libraries provide an implementation of #printString and
#storeString in Object that both produce the same result, and also implement
Object class>>readFromString: using "Compiler evaluate:". Consequently, "x
class readFromString: x storeString" may or may not evaluate to "x."
"Date readFromString: Date today storeString" produces an exception in
VisualWorks also. I would suggest that you try "Date readFromString: Date
today printString" instead.
--Alan
-----Original Message-----
From:
[hidden email]
[mailto:
[hidden email]] On Behalf Of stéphane
ducasse
Sent: Monday, May 29, 2006 2:31 AM
To: The general-purpose Squeak developers list
Subject: Date readFromString: Date today storeString....is it a bug?
Date readFromString: Date today storeString
raises an exception...
testReadFrom works so it is the idiom readFrom:/storeOn: that does not work
anymore?
Stef