Two comments on the Constants API
jbvernee at xs4all.nl
Mon Jun 4 22:43:03 UTC 2018
Allow me to way in as someone who spends a lot of time exploring the JDK
code through my IDE.
The main way I expect people to find out about these new interfaces is
not through reading the javadoc or by looking at the source code, but by
using IDE auto-complete on an expression of one of those types. For
instance, in Eclipse I can type in `"Hello World!".` then press
ctrl-space and it displays a list of methods that I can call on
`String`. This is provided out-of-the-box functionality. Looking at the
source code or javadoc through the IDE on the other hand requires me to
manually attach it to the "JRE System Library" that I'm using (in
Ecplise at least, which is a non-obvious process), which I don't expect
many non-experts to be interested in. Though I can see people finding
out about it in the online javadoc as well.
The next thing I expect people to do, is to type in the name of one of
the methods into google, after which they will probably end up at either
Stack Overflow, the online javadoc, or some other blog-type website that
explains what it is. (I'll be on SO to answer the questions).
So I'm not sure how much adding another interface would actually help. I
might be biased though, since I use the auto-complete feature a lot to
'explore'. (if you do add it though, please make it package-access in
java.lang, to avoid people trying to implement it themselves).
More information about the amber-dev