[plt-scheme] serialization: transient fields

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Tue Aug 8 22:37:38 EDT 2006

I am using serialization on a class defined by define-serializable-class
and want some members to not be serialized, equivalent to the
`transient' keyword in Java. Is there a simple way to do this? Id rather
not fool around with externalizable<%> unless its really easy, which it
doesnt seem like it is.

Or alternatively I wouldn't mind being able to hook into the
serialization flow and set the member field to #f right before actual
serialization. The main issue is the value of the member field is
something that isnt serializable so (serialize obj) fails with

serialize: expects argument of type <serializable object>; given
#<struct:image>



Posted on the users mailing list.