Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While it’s more how they are used, imo optional is abused to the point it adds complexity. You don’t avoid handling null, but now you have to deal with present or not. Therefore you’ve gone from 2 states to 3. Use of value or null is simpler to me and use of optional can be via Optional.of() rather than parameters and properties for the vast majority of cases.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: