At 4:01 PM +0100 8/29/02, Nicholas Clark wrote:
>On Thu, Aug 29, 2002 at 07:52:42AM -0700, Steve Canfield wrote:
>>  From: Dan Sugalski [EMAIL PROTECTED]
>>  >I actually had something a bit more subversive
>>  >in mind, where the assignment operator for the
>>  >Date class did some magic the same way we do
>>  >now when we do math on strings.
>>
>>  I was thinking a simple general purpose rule. If the variable is
>>  typed, and its class has a standard static method for
>>  instantiating from a string, and if a String object is being assigned
>>  to the variable, then the class's deserialization method is called,
>>  returning the new object and assigning it to the variable.
>
>This is possibly more an internals question, but I was assuming that the
>serialization/deserialization methods would normally be converting an object
>to an efficient packed 8 bit binary serial format (much like Storable
>does).

The format that's used to store the serialized data is up to both the 
class serializing itself and the serialization method currently in 
force, though the latter is invisible to the classes serializing 
themselves. (That way the classes can use pure packed data, while the 
serialization method may turn that to base64 or something to make it 
safe to transfer, or something of the sort)

Counting on the serlialized format to be human readable's probably a bad idea.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to