Null restricted type and JSpecify

Kevin Bourrillion kevinb at google.com
Wed Nov 23 19:23:22 UTC 2022


There were some offline musings related to this but no actual "proposal".
Not sure what Brian will come up with.

I'm very glad for more awareness of our work obviously... but I don't want
to overstate how directly applicable it is to Valhalla. The relationship
between the two could be more complex; I'm only interested that we can see
some path toward future unification, and we can convince ourselves we're
not stepping off that path.


On Wed, Nov 23, 2022 at 5:04 AM Remi Forax <forax at univ-mlv.fr> wrote:

- there is no @NonNull, a lack of @Nullable inside a @NullMarked scope
> encodes the fact that a type is non null.


(Well, we did eventually add it; the javadoc
<https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html> explains
why. Sorry the spec isn't current. The javadoc and design faq are much more
so.)


JSpecify is specified in term of subtyping relationship not in term of
> boxing/unboxing rules.


>From our reading of the JLS, this was just the most convenient way to do
it. If it goes wrong somehow, we missed that.


-- 
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-observers/attachments/20221123/7f57e6f5/attachment.htm>


More information about the valhalla-spec-observers mailing list