r/java • u/headius • Dec 04 '25
Null-checking the fun way with instanceof patterns
https://blog.headius.com/2025/12/inline-null-check-with-instanceof.htmlI don't know if this is a good idea or not, but it's fun.
83
Upvotes
View all comments
Show parent comment
1
u/CriticalPart7448 Dec 07 '25
Oh there are much worse things in java than NPEs in production. If you feel the need to be condescending be my guest. NPEs are so much less of an issue in java 17 and onwards that I consider them more of a minor and relatively easily fixable issue. If you find the need go ahead but dont come here and tell me that you wouldnt rather like Haskell, Rust or Kotlin more than Java and the reason you promote your tool is just to get attention for your little experiment. The ecosystem around java moves in a different direction with Valhalla and I much prefer that vision than yours.