Serialization stability (was: syntax)
Brian Goetz
brian.goetz at oracle.com
Mon Oct 8 08:45:12 PDT 2012
> Well, they don't really solve the problem of making serialization
> correct; they accept as given that it's OK for anonymous and (worse yet)
> capturing lambdas to be serialized with the expectation that it'll just
> be flat-out wrong if you change the source in any way, which is
> something I absolutely do not concede and which I firmly believe will
> bite us (where "us"=="Java EE vendors"... and RMI users, and JPA users,
> and just about any of the hundreds of widely-used serialization-based
> technologies out there).
I think the correctness you seek is just inachievable. Even with named
classes, serialization has all sorts of limits and gotchas. With inner
classes, people have learned that you can use inner classes with
serialization when you have identical bytecode on both sides of the
pipe, and can't otherwise. Its imperfect, but it seems a reasonable bar
to say "no worse than inner classes".
I get that you would like to set a higher bar -- and I'm open to seeing
what we can do to meet a higher bar. But first we should meet the bar
we have, and we're stuck there.
More information about the lambda-spec-experts
mailing list