mbien commented on PR #9241: URL: https://github.com/apache/netbeans/pull/9241#issuecomment-3992507937
> .. and will still help with migrating things away from things like class-holder idiom now. This is the reason why I try to add this in the first place. Maybe I am missing something, but why would this be more difficult to achieve as internal utility? Module adds itself on the friends list and uses it. I really don't like the idea of adding public API while knowing that they will be deprecated in a few years - _technically_ they would be deprecated the moment `LazyConstant` is finalized since client code should always use the JDK API instead if possible - given that platform apps are not bound to the same min requirements as NB is. Thought about what else the module could offer at some point: Both [List.ofLazy](https://download.java.net/java/early_access/jdk26/docs/api/java.base/java/util/List.html#ofLazy(int,java.util.function.IntFunction)) and [Map.ofLazy](https://download.java.net/java/early_access/jdk27/docs/api/java.base/java/util/Map.html#ofLazy(java.util.Set,java.util.function.Function)) should be doable with fallbacks I believe. I think those factory methods are interesting from a technical perspective but far more niche than `LazyConstant` itself. (but if we find a usecase -> I could probably add it) -- 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
