Re:Lies we tell ourselves to keep using Golang
by lupire on Saturday April 30, 2022 @03:43PM
(#31218662)
If you enable nullness checks, Java is the same.
[ Parent
| on HN ]
Re:Lies we tell ourselves to keep using Golang
by ohgodplsno on Saturday April 30, 2022 @04:58PM
(#31219279)
No such thing as nullness checks in Java. At best, your IDE is taking the annotations into account and giving you warnings. At worst, you have to run ErrorProne and have it yell at you.
Additionally, all Java code (including the one you wrote) is only optionally null checked. All Kotlin code _is_ null checked, no matter what.
Re:Lies we tell ourselves to keep using Golang
by lupire on Monday May 02, 2022 @04:05PM
(#31240189)
ErrorProne is part of the compiler suite.
Re:Lies we tell ourselves to keep using Golang
by ohgodplsno on Tuesday May 03, 2022 @07:58AM
(#31247231)
??? Absolutely not. ErrorProne is a Google project that is not integrated into javac, and merely acts as a plugin to it. To have ErrorProne running on your project, you need to:
- Know about it (first, big problem for many java shops)
- Integrate it with Gradle/Maven/Ant/yourbuildtool
- Enable the null checks because they are not enabled by default.
Compare this with "it's already in the compiler"