Dan Sugalski <[EMAIL PROTECTED]> wrote: > On Mon, 24 Nov 2003, Leopold Toetsch wrote:
>> In the mean time I've checked in freeze/thaw for PerlHash. It uses an >> element count as list does. We could of course use your proposed scheme > ^^^^^ > You mis-spelled "will" here. Your explanation about the start/stop pairs just arrived after I had coded the PerlHash freezing. But that's small and easy to change. >> with start/end-markers too. But thawing a list of a (first) unknown amount >> of items isn't really as simple as having a count. > Right -- it's even simpler, and makes doing logical skips through the > frozen data easier for code doing external examination, since there's > structure in the frozen data rather than a glob of random data elements. Having a count in front is as structured as having items in between start stop markers and I don't see any randomness. I seem currently missing some detail bits. e.g. freezing and IntList would be now: [ pmc-id pmc-type N (int-values)*N ] I don't have a clue, how the end-marker could transparently be coded to discern the end of the list from a value. Or do you mean start/end-markers plus a count? For a Hash the sequence now is: [ pmc-id pmc-type N (str-key, pmc-value)*N ] So here again (w/o count) I would have to be prepared to get an end-pair or a key. > Dan leo