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

"throws IOException" is too much code? Or is the issue more that you can't really do autocoercion to a declared thrown type in Java the same way that you can do in Rust?

Proliferation of types is an issue in Java, but the whole language has that problem. It's not just exceptions.



Personally if I were to argue why rust error handling is better than Java it wouldn’t be the too much code part.

I feel the same way about Go vs Java or Zig vs Java, I think errors as values makes more sense.

It’s the laws of the universe breaking and control flow changing on errors that I think most people hate.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: