Data Oriented Programming, Beyond Records

Ganapathi Vara Prasad ganapathibasamsetti at gmail.com
Wed Jan 14 03:40:29 UTC 2026


Corrected Brian's email address.

On Wed, 14 Jan, 2026, 8:55 am Ganapathi Vara Prasad, <
ganapathibasamsetti at gmail.com> wrote:

> Hello Brian,
>
> Thank you for thinking on this feature. I want to better understand the
> thought process behind marking all fields that are part of the component
> state instead of only the derived fields. Something like this:
>
> ```
>
> class Point(int x, int y) {
>      private final int x;
>      private final int y;
>      private final derived double norm;
>
>      Point {
>          norm = Math.hypot(x, y);
>      }
>
>      public double norm() { return norm; }
>
>      // derived implementation of x and y accessors
>      // derived implementation of equals, hashCode, toString
> }
> ```
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20260114/7660a07f/attachment.htm>


More information about the amber-dev mailing list