TisonKun commented on issue #7528: [hotfix] [utils] Implement utils without 
cost of "enum"
URL: https://github.com/apache/flink/pull/7528#issuecomment-455491916
 
 
   @zentol 
   
   >we use this pattern quite a lot
   
   1.For utils, I grep classes and find only `org.apache.flink.docs.util.Utils` 
and `org.apache.flink.runtime.client.ClientUtils` follow this pattern.
   2. The cost is neither enormous or frequent. A utils implemented using 
`enum` is compiled ~500 Byte bigger than `final class` with `private 
constructor` version.
   
   I open this pull request for an option to recommend reduce the cost of 
abstraction(we need utils, but using `enum` also introduced extra `name`, 
`ordinal` fields and methods). Nevertheless, I don't insist this change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to