Why Make Value Class Fields Final?
Scott Stevenson
sstevenson638 at gmail.com
Mon Jul 22 18:35:24 UTC 2024
I was an engineering software tools developer. I started my career using
FORTRAN, and ended my career using Java. I recently retired and still code
for fun because it's in my blood and I'm still trying to invent the perfect
high performance engineering analysis app.
I have been following Valhalla with much interest. However I am concerned
that if you make value classes immutable it will render them useless for
the way I learned to write performance codes. The reason being is that for
high performance calculations you need memory to hold the input data and
memory to hold the outputs. These calculations could possibly be done on
the GPU, or at the very least parallelized on the CPU. If you make value
classes immutable they will work fine as inputs, but not for outputs
because they cannot be changed after they are allocated. Am I
miss-understanding how value classes are expected to be used? Please
explain how value classes can be used to improve high performance
calculations.
Thank You,
Scott Stevenson
Associate Technical Fellow, Boeing, Retired
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-comments/attachments/20240722/653b40b2/attachment.htm>
More information about the valhalla-spec-comments
mailing list