[M3devel] [Fwd: Re: <*LAZYALIGN*>]
Randy Coleburn
rcoleburn at scires.com
Sat Feb 23 01:21:05 CET 2008
I agree with Rodney.
Regards,
Randy
>>> "Rodney M. Bates" <rodney.bates at wichita.edu> 2/22/2008 5:01 PM >>>
But pickles are working below the type safety of the language, copying
bits around. True, pickles will only build an object in the reading
program with the same type it had in the writing program. But the
layout of fields can be different, even with the same type, for example,
due to integer size, or as you say, endianness. Pickles has to be able
to reconstruct the bit layout of a type both as it was on the writing
machine and as it is on the reading machine.
If anything LAZYALIGN is written to a pickle, then it's already broken,
because pickles will have the wrong idea about where the bits of the
fields are located and will garble bits. Pickles always recomputes
bit layouts as the compiler would for STRICTALIGN.
Which means, if you never pickle anything that is LAZYALIGN, you won't
invoke this brokenness. And it sounds like nobody is doing that, so
it's not broken for current uses.
Darko wrote:
> I don't think breaking pickles is at issue at all since the alignment
> issues don't change the meaning of a type, only its layout in memory on
> a particular platform, akin to endian issues.
>
>--
-------------------------------------------------------------
Rodney M. Bates, retired assistant professor
Dept. of Computer Science, Wichita State University
Wichita, KS 67260-0083
316-978-3922
rodney.bates at wichita.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080222/27267e81/attachment-0002.html>
More information about the M3devel
mailing list