Yukihiro Matsumoto wrote:
> 
> Hi,
> 
> In message "patch to allow dump/load to work on DATA objects"
>     on 02/02/20, Joel VanderWerf <vjoel / PATH.Berkeley.EDU> writes:
> 
> |I don't think there's any *general* way to marshal objects that have a C
> |struct attached to them (i.e., created with DATA_MAKE_STRUCT or
> |DATA_WRAP_STRUCT) and which contain arbitrary data (including references
> |to Ruby objects), so here's a patch that cleanly adds that
> |functionality.
> 
> Thank you for interesting idea.  I'm thinking of a new marshal
> framework that is highly customizable via Serializer objects.  I think
> I'm going to fix this "problem" too in that framework.
> 
> The framework should:
> 
>   * separate object traversal and object serialization.
>   * object serialization scheme can be defined by users by defining
>     Dumper/Loader class pair.

That sounds like the best approach for the future. I especially like
factoring out traversal, which would be useful for other things (deep
copy/compare without serialization). But for now, what do you think
about the patch? Would you like me to send you some test code?

> But it still is a vague idea.  I have too much vapor ideas. ;-)
> 
>                                                         matz.

Better than no ideas...