You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/01/18 10:02:38 UTC

[GitHub] TisonKun edited a comment on issue #7528: [hotfix] [utils] Implement utils without cost of "enum"

TisonKun edited a comment 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 nor 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 that reduce a bit of 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:
users@infra.apache.org


With regards,
Apache Git Services