Data Oriented Programming, Beyond Records

Brian Goetz brian.goetz at oracle.com
Wed Feb 25 17:52:11 UTC 2026


> One missing discussion is serialization or exatcly what about the easy 
> serialization we get with records ?

Records that are marked Serializable get special treatment in 
serialization.  They also are excellent candidates for use as serial 
proxies.  Deconstructible classes with canonical constructors would also 
be good candidates for use as serial proxes.  I am doubtful we want to 
grant the special serialization treatment of records to deconstructible 
classes; I don't see a principled basis for doing so, since 
deconstructibility is about taking things apart, not representation.

> If a deconstructible class implement Serializable, should a canonical 
> constructor, with the same visibility as the class, required * ?

I think we are better off leaving the legacy serialization mechanism 
alone, and directing such questions to Marshalling.

(Serialization bullet dodged!)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20260225/b135b376/attachment.htm>


More information about the amber-spec-experts mailing list