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: [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