Move to jspecify? #2783
Replies: 7 comments 1 reply
|
I have waited many years for a standard to emerge, ten years only for TYPE_USE annotations getting attention by others. I will certainly look at the new kid on the block, even though it is not a standard. Whether or not it is feasible to switch to those annotations without breaking users of JDT needs to be determined. While I was still involved in that initiative it didn't look like compatibility with prior art was high on their agenda, but I believe this has changed to some degree in the time since. Just to call out the reason for my reluctance: it is not just about the fully qualified name of annotations, it is also very much about semantics which likely differs in many details. |
|
on ... ... I see:
We still have to wait for this. |
|
Unfortunately, jspecify doesn't help even for the long standing discussion on |
|
I just recently stumbled over JEP draft: Null-Restricted Value Class Types (Preview)
The problems with "standards" is they tend to proliferate |
|
As an avid JDT user, I would love to see JSpecify support. To address some of the earlier discussion points:
From my naive point of view, it looks like the spec has been completed.
There was a JSpecify talk at KotlinConf, addressing this concern (even referencing the same XKCD comic), see the Slide deck page 15ff. From what I understand, the long-term goal for the JDK is to finally address null in the type system with Null-Restricted and Nullable Types. Furthermore, the semantics of JSpecify are closely aligned with what the JDK intends to adopt (cf this Reddit comment from one of the JSpecify Contributors). So once nullability has been addressed in the JDK, it should be possible to mechanically transform the JSpecify annotations, e.g., to go from |
|
Linking some related issues: |

Uh oh!
There was an error while loading. Please reload this page.
See https://jspecify.dev/blog/release-1.0.0/
I personally always disliked the fact that we had 42 different NP annotation libraries in Java.
I wonder if 1) we can move to jspecify annotations and 2) also configure them to be default instead of jdt annotations in JDT UI.
@stephan-herrmann : you are the expert in this area, WDYT?
All reactions