3 ms·
I find lauding use of Optional over null for return values, but eschewing checked exceptions somewhat inconsistent. The problem with null is it can be returned
by anotherevan 11y ago
I find lauding use of Optional over null for return values, but eschewing checked exceptions somewhat inconsistent. The problem with null is it can be returned anywhere, from any function. It is difficult to generate compile time errors for if they go unhandled. But unchecked exceptions are great because you don’t have to then think about them. hmmm.
Addendum: I’m also of the opinion that trying to write java code without an IDE is highly inefficient. With an IDE, you can locate all the throws you’re not taking care of quickly, and usually quickly deal with them to get things to compile. Yeah, it’s a bit of housekeeping overhead, but once they are dealt with, they are dealt with, even if it is just passing them upstream.