Data Oriented Programming, Beyond Records

Archie Cobbs archie.cobbs at gmail.com
Wed Jan 21 22:32:14 UTC 2026


Thanks for the thoughtful replies & apologies for you being double-teamed
in this thread today :)

I like the conceptual aspects of carrier that it "reverse inherits" from
record, i.e., it has a pull-apart operation, a put-together operation, and
composing those two operations equals the identity operation (modulo
equals() of course).

I think it would have been a reasonable choice for records to use value
equality instead of equals() equality, but that's a moot point now and
anyway I can always @Override if needed so not a big deal. So practically
speaking, at this point, I agree it makes sense for carriers to be
consistent with that.

The deals are not mutually exclusive.


That's very good and in effect solves my problem, I think. Will one be able
to declare a value record? (Is that a contradiction?) Otherwise, presumably
it would have to be a concrete value carrier class... ?

Thanks,
-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20260121/677d85e2/attachment.htm>


More information about the amber-spec-experts mailing list