Serialization

Mark Reinhold mr at sun.com
Thu Dec 10 21:31:23 PST 2009


> Date: Thu, 10 Dec 2009 23:20:51 +0100
> From: Patrick Wright <pdoubleya at gmail.com>

> May we assume that there will be nothing about how closures are
> implemented that would prevent fields of function types in
> serializable classes?

Good question; I hadn't yet thought about this issue.

For a closure to be serializable would require all the values it
references to be serializable, including "this" if it captures its
enclosing instance.  If that's true then offhand I don't see any
other problems and it should "just work".

(Serialization is tricky though, so I may well be missing something.)

- Mark


More information about the lambda-dev mailing list