Re:Retrofitting null-safety onto Java at Meta
by rad_gruchalski on Tuesday November 22, 2022 @12:36PM
(#33708446)
Other jvm languages compile to the byte code and fix this by inlining the optional transparently.
What you mean by “at a language level” would break the byte code for jars compiled with older jdks.
Re:Retrofitting null-safety onto Java at Meta
by didip on Tuesday November 22, 2022 @12:47PM
(#33708566)
Breaking backward compatibility is not the end of the world.
Re:Retrofitting null-safety onto Java at Meta
by bismuthcrystal on Tuesday November 22, 2022 @01:14PM
(#33708882)
It might not be, but is damn close to it.
Re:Retrofitting null-safety onto Java at Meta
by rad_gruchalski on Tuesday November 22, 2022 @02:09PM
(#33709791)
Maybe not for you. I have experienced the Python 2 to 3. When I use Java, I’m happy I can rely on the compatibility.
Re:Retrofitting null-safety onto Java at Meta
by pgwhalen on Tuesday November 22, 2022 @02:43PM
(#33710325)
Thank god the Java language designers don’t share your point of view.
Re:Retrofitting null-safety onto Java at Meta
by mrkeen on Tuesday November 22, 2022 @05:13PM
(#33712301)
> Java has so many deficiencies in its design that so many frameworks are invented to cover its flaws.
Java the language has its flaws, but the frameworks make the situation worse.
> Just give a real Optional type at a language level. It’s clearly possible in other JVM languages.
It's not the presence of Optional that we need, it's the absence of nulls. And nulls are in all the libraries. And you also have to convince your fellow Java developers that null is bad.
Just give a real Optional type at a language level. It’s clearly possible in other JVM languages.