<div dir="ltr"><div>The following two lines are quotes from Dan's list of "key ideas":</div><div></div><div>
<pre>- Nullness is an *optional* property of variables/expressions/etc., distinct from types.<br>- Type variable types have nullness, too.<br><br></pre><pre>To me, this looks a little contradictory. If we agree on the first statement (and I do agree with it),<br></pre><pre>then Type-variables should not have an attached nullness-marker.<br></pre><pre>Rather, each _use_ of a Type-variable in a generic class would have the attached nullness.<br><br></pre><pre>Otherwise, a type-variable would again denote a "non-nullable" type, so you'd be back where you came from...<br></pre><pre><br></pre><pre>Consider the following example. IMHO, adding @NonNull to the type-variable would be of no real advantage.<br><br></pre><pre>class Holder<T> {<br></pre><pre> static <T> Holder<T> of(@NonNull T value) {<br>}<br>}
<br></pre><pre><br><br><br><br></pre>
</div></div>