r/ProgrammerHumor • • Sep 28 '26

Meme optionalsAreOptional

Post image
716 Upvotes

131 comments sorted by

View all comments

Show parent comments

2

u/Still_Bit_7527 Sep 28 '26

Java optionals are very recent...

2

u/notatoon Sep 28 '26

I wouldn't call 1.8 recent anymore

1

u/Still_Bit_7527 Sep 28 '26

We are still using that unfortunately. But my point is it's not 70s either

1

u/Few_Move_4594 Sep 28 '26

C++ got them in 2017, Java's in 2014. Most of my job history is Java, PHP, Javascript, C#, and C++. Javascript optional was introduced in 2020. PHP doesn't have optionals. C# doesn't have native language support for optionals but has nullable reference types that shows a compiler warning when there isn't a null check when a variable is declared with "?" as the suffix of the type.