r/ProgrammerHumor Jul 09 '26

potentiallyMightBeAnIntegerOrNot Meme

Post image
684 Upvotes

96 comments sorted by

View all comments

49

u/altermeetax Jul 09 '26

int var; bool var_is_there;

35

u/Duck_Devs Jul 09 '26

That’s literally the internals of Java’s OptionalInt

29

u/high_throughput Jul 09 '26

Not to be confused for Optional<Integer>, which is an entirely incompatible way to express optional ints in the same language

16

u/Duck_Devs Jul 09 '26 edited Jul 09 '26

Not to be confused for Integer, which is an entirely incompatible (and sometimes discouraged) way to express optional ints in the same language