[XML-SIG] Anything else to go in?

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Fri, 16 Oct 1998 19:08:39 -0400 (EDT)

Ken MacLeod writes:
>The LDOBinary module was implemented as much by empirical testing as
>by reading pickle.py and others, so I'm not sure how much I can help
>with a truly lossless implementation :-).  I have a good feel for the
>pattern I described above so I can help make sure what we come up with
>is consistent with that.  Let me know what you'd like me to do.

	Well, the simple types such as integers and floats are easy.
They're fairly similar across languages; one might worry about
different integer sizes and FP precisions, but the unmarshalling code
might simply implement a "best effort".  For example, on a 64-bit
platform you might generate <value
type="integer">18014398509481984</value>, which won't fit in a 32-bit
integer; a 32-bit platform confronted with this would have to deal
with it by converting to a long or BigInteger or whatever.  I'll
proceed for now with "integer", "long", "float", "complex", "string",
and see how that goes, but perhaps the type attribute should have
values like i32/i64, instead, and be more precise about the limits.

	Objects are a whole other kettle of fish.  In Python they
could basically be dictionaries mapping from attribute -> value.  But
how would one specify the class of the object?  In Python there's an
attribute called __class__, but that shouldn't creep into LDO.  

A.M. Kuchling			http://starship.skyport.net/crew/amk/
Errors using inadequate data are much less than those using no data at all.
    -- Charles Babbage