uschindler opened a new issue, #13207:
URL: https://github.com/apache/lucene/issues/13207

   ### Description
   
   This is an overview issue about all classes in current Lucene's main branch 
to be ported over to `record` classes. Record classes are fine for immutable 
data structures which have no functionality and are not part of class hierarchy 
(they have no superclass).
   
   Records offer several simplifications for implementing them:
   - equals, hashCode and toString are autogenerated by an invokedynamic, so we 
can't forget to handle it correctly
   - it is also immutable
   - all parameter checking logic can be moved to some special constructor 
without any parameters (this is new syntax since Java 17)
   - In later java versions they will have an optimized internal layout and 
arrays of record classes may no longer be pointer arrays (see Project Valhalla 
with a first preview of it in Java 22). In future they will also not have 
identity anymore (I don't understand the impact yet).
   
   The following classes are candidates (please add more here and add link to 
PR):
   - `IOContext`, `MergeInfo`, `FlushInfo`: #13205


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to