It is also worth noting that Granny 2.x shipped out of the box with a generic C serializer that handled circular references, discriminated unions, endianness conversion, and version remapping for arbitrary data structures. And that was in 2002.
-
-
You could also annotate the pointers as whether or not they are this special type or not, so only do the expensive test for them. But it's still two passes for the whole thing even if there's only one pointer like that.
-
Oh - you could do a pre-pass of the TYPE system and "poison" that whole branch of TYPES. Then you make sure that branch gets done last. There will be cases (e.g. circular references) that can't be solved like this though. Then you still need two passes.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.