News for hackers. Stuff that matters.
Re:Optional If Expressions by brabel on Saturday April 15, 2023 @03:36AM (#35578491)
The rule in Java, enforced by the programmer, not the compiler, is that you never assign an Optional to null. If a method returns Optional, you're free to assume it will never return null. If it does, you should track down and publicly shame the author of such monstrosity.
Re:Optional If Expressions by mst on Saturday April 15, 2023 @05:31AM (#35579020)
"If you do that, ideally, a small gnome climbs out the back of the computer and hits the developer with a mallet."

(various bits of perl IRC have adopted the mallet gnome as an idiom over the years and it seems to convey the "please don't" point without being overly combative ;)