Re:Why Java? Tales from a Python Convert
by angryasian on Tuesday December 08, 2015 @05:17PM
(#10700078)
Now with Optional in Java 8 its not an issue.
[ Parent
| on HN ]
Re:Why Java? Tales from a Python Convert
by alexkindel on Tuesday December 08, 2015 @05:41PM
(#10700257)
Optional is great, but it would be far more powerful if types not wrapped in Optional were guaranteed to not be null.
Re:Why Java? Tales from a Python Convert
by TheCoelacanth on Wednesday December 09, 2015 @12:54PM
(#10705339)
And if Optional values themselves were guaranteed not to be null.
Re:Why Java? Tales from a Python Convert
by wtetzner on Wednesday December 09, 2015 @11:16AM
(#10704515)
It's still an issue, because as far as the type system is concerned, every reference type can still be null.
Optional gives you a way to avoid using nulls, but null is still in the language and libraries still use it.