Data Oriented Programming, Beyond Records
Viktor Klang
viktor.klang at oracle.com
Wed Feb 25 21:24:15 UTC 2026
Weighing in on this, I (too) don't think we need to adjust this for
Serialization.
On 2026-02-25 18:52, Brian Goetz wrote:
>
>> 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!)
--
Cheers,
√
Viktor Klang
Software Architect, Java Platform Group
Oracle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20260225/74c64e02/attachment.htm>
More information about the amber-spec-experts
mailing list