You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/09/12 18:09:44 UTC

[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #4625: Minor cleanup in YAML Language Support

matthiasblaesing commented on code in PR #4625:
URL: https://github.com/apache/netbeans/pull/4625#discussion_r968749055


##########
ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlLanguage.java:
##########
@@ -155,12 +167,72 @@ public InstantRenamer getInstantRenamer() {
         return null;
     }
 
+    public static final Language<YamlTokenId> language =

Review Comment:
   I saw this now multiple time - I think it is an error to expose members of a class to the outside without a safety net. I acknowledge, that ` records` dropped the `get` prefix (still think this is an error), but they still use functions. Using a function allows you to modify the getter to log usages or provide an adapter to a new implementation, that might not be available when the class is created or is costly to create. At the same time hotspot should (I did not measure) be good enough in inlining getters. For an API this would be a no-go for me, for internal module use it still feels wrong to me.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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