logoalt Hacker News

tsimionescuyesterday at 2:52 PM1 replyview on HN

The whole point of using Optional/Maybe is to prevent the possibility of accidemtally creating nulls. If you don't make mistakes, then nullability is not a problem. If you do make mistakes, then a class that only helps when you don't make mistakes is basically useless.

This also has significant impact for serialization/de serialization - a classic place where you get unexpected nulls, that Java Optional/Maybe don't help with at all.


Replies

joe_mwangiyesterday at 4:10 PM

Since they plan to have null-restricted types, then I don't see any issue.

show 1 reply