On Sunday, 16 February 2014 at 22:41:59 UTC, Orvid King wrote:
Why not? Think of languages like C and C++, they only support
pointers. Pointers to basic types are not so interesting but
pointers to structs are.
Because, by serializing a pointer, you are implying that
mechanism that will be deserializing the value both exists on
the same machine, and lies within the same address space,
otherwise it will be referencing incorrect data.
No, it should just serialize the pointed value and make the same
difference upon deserialization - if it is a value, write to it,
otherwise allocate new instance on heap and assign its address.