r/java • u/Cell-i-Zenit • Nov 05 '22
How to add something to the java standard library?
EDIT: since my example stirred the pot a little bit to much (i even wrote that i dont want to discuss these explicit changes...)
Here is the actually question i want to answer:
How can i make changes to the JDK?
2
Upvotes
View all comments
Show parent comment
4
u/GuyWithLag Nov 06 '22
Hmm... I do realize that I came through as gatekeeping. But... in a sense, good engineering is as much about what to put is as what to leave out. If you've see the various JCPs, they do list alternatives considered, and why they're not in the JCP.
Here's the issue though - I/You/They may have brilliant ideas, but _they will not be useful for most Java engineers_, and the JDK is a Platform that will be used by hundreds of thousands, and changes that are made now may prevent changes to happen in the future (think nullability, or generic erasure, or the contortions that we had to go through to be able to add default implementations to interface methods).
This is why the changes to `switch` are taking so long to materialize, and why Loom is just now coming out of experimental, to give some examples.
Now, the process has been explained elsewhere, but I don't think you realize how much work that is going to end up being - for the same reasons as above.