mbien commented on PR #7587:
URL: https://github.com/apache/netbeans/pull/7587#issuecomment-2234076087

   thanks for the review, I will try to split cleanup the rest from now on 
again. 
   
   My opinion about misuse of records for final classes with immutable fields:
   
   if its a private or package private non-API utility, I would personally go 
with whatever is most concise or reads best. There absolutely are problems with 
record overuse, but this is often a problem in API. Interfaces on top and 
records on the bottom can look convenient, but as soon you need an additional 
field which can't be passed through the canonical constructor you designed 
yourself into a corner and have to recompute state in methods again and again.
   
   So I do agree that record overuse can cause problems, but I think in 
situations where you can change back to a final class at any point in future - 
it is no real problem. You get a good `toString()` for free which helps when 
debugging.
   
   `var` overuse however... does actually obfuscate code since it hides types 
entirely, now add inline hints again and it often uses more space than without 
`var` - but you know that this is my personal pet peeve ;)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to