Re:JVM/Java: Null-Restricted and Nullable Types
by eru on Saturday August 10, 2024 @09:29PM
(#41213389)
> I can't think of a reason why you would want to declare something as nullable when not declaring anything automatically makes the type nullable anyway.
To show the reader of your code that you explicitly want this nullable, instead of just being too lazy to type?
You can then use a linter to forbid the implicit behaviour in your code.
To show the reader of your code that you explicitly want this nullable, instead of just being too lazy to type?
You can then use a linter to forbid the implicit behaviour in your code.