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

Since Java doesn't have pass-by-ref, this would probably be just as awkward as try-catch.


Guava's Hints.tryParse is about as good as it can get in Java... Maybe it could return an Optional instead of a nullable boxed type, but the calling code wouldn't be much different.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: