| ▲ | never_inline 3 hours ago | |
The dislike is probably because of 2 reasons. 1. in most cases they don't want to handle `InterruptedException` or `IOException` and yet need to bubble them up. In that case the code is very verbose. 2. it makes lambdas and functions incompatible. So eg: if you're passing a function to forEach, you're forced to wrap it in runtime exception. 3. Due to (1) and (2), most people become lazy and do `throws Exception` which negates most advantages of having exceptions in the first place. In line-of-business apps (where Java is used the most), an uncaught exception is not a big deal. It will bubble up and gets handled somewhere far up the stack (eg: the server logger) without disrupting other parts of the application. This reduces the utility of having every function throw InterruptedException / IOException when those hardly ever happen. | ||
| ▲ | dehrmann 33 minutes ago | parent [-] | |
> 2. it makes lambdas and functions incompatible. This is true, but the hate predated lambdas in Java. | ||