<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Here are my questions:<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>1/ Nullness of type variable<br></div><div>  "Like other types, a type-variable type (that is, a <em>use</em> of a type variable) may express nullness. <code>T!</code> is a null-restricted type, and <code>T?</code> is a nullable type."<br data-mce-bogus="1"></div><div> - what does 'T' exactly mean ?<br data-mce-bogus="1"></div><div>   For me, there is the old 'T' which propagate the type but not propagate the nullability and there is the new 'T' that propagate both the type and the nullability of the type.<br data-mce-bogus="1"></div><div>   During the JVMLS, Dan Smith references them as 'T' and 'T*'. </div><div><br></div><div>2/ If we agree that there are 4 different kinds: String/T, String?/T?, String!/T! and T*, we now have the choice of several user facing models<br data-mce-bogus="1"></div><div>  - model 1, we let the user annotate using '!', '?' and '*'<br data-mce-bogus="1"></div><div>  - model 2, we have an opt-in mechanism that set type as '!' by default and type variable as '*' by default.<br data-mce-bogus="1"></div><div>  - model 3, we only let user to annotate type variable declaration, type of field, type of parameter types/return type, parametrized type (inside the angle brackets) and cast, the rest is inferred<br>    (this is the semantics of jspecify).</div><div><br data-mce-bogus="1"></div><div><div>3/ Nullness of wildcards<br></div><div>  "A type variable declaration or wildcard may have nullness markers on its bounds. A type may satisfy the bounds via nullness conversion, though, so again these nullness markers are not strongly enforced, but may cause warnings."<br></div><div><br></div><div>  => I see two questions here :<br></div><div>   - unbounded wildcards, they are special because they represent a reified type, so ? is nullable in List<?> because list.add(null) is valid at runtime, thus List<?> is equivalent to List<? extends Object?>.</div><div>     Do you agree ?</div><div>   - super wildcard, the content of List<? super Foo!> may accept null because Foo? is a super type of Foo!, so List<? super Foo!> is maybe nullable or maybe not,</div><div>     so the content is neither a '!' nor a '?'. Do you agree ?</div></div><div><br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Brian Goetz" <brian.goetz@oracle.com><br><b>To: </b>"Remi Forax" <forax@univ-mlv.fr>, "valhalla-spec-experts" <valhalla-spec-experts@openjdk.java.net><br><b>Sent: </b>Tuesday, September 3, 2024 10:44:03 PM<br><b>Subject: </b>Re: Null-Restricted and Nullable Types<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><font size="4" face="monospace">There are many points that are not
      clear to us as well, but we will try to respond to your questions
      :)</font><br>
    <br>
    <div class="moz-cite-prefix">On 9/3/2024 4:41 PM, Remi Forax wrote:<br>
    </div>
    <blockquote cite="mid:1949658111.62587211.1725396089114.JavaMail.zimbra@univ-eiffel.fr">
      <pre class="moz-quote-pre">Hello,
if everybody is okay with that i would like to discuss about Null-Restricted and Nullable Types [1] tomorrow.

There are several points that are not clear to me, i will try to come up with a list for tomorrow.

Rémi

[1] <a class="moz-txt-link-freetext" href="https://openjdk.org/jeps/8303099" target="_blank">https://openjdk.org/jeps/8303099</a>
</pre>
    </blockquote>
    <br><br></blockquote></div></div></body></html>