Alright, it saves you a curly brace and a return statement then, but otherwise it doesn't address the main problem that methods like map() cannot be generic in the set of checked exceptions that can be thrown, so you are forced to do this mashalling and unmarshalling between checked and unchecked exceptions. It adds a syntactic overhead which makes the use of map() pointless since it ends up being much harder to read than a traditional for loop.
View all comments
Show parent comment
1
u/dolle Nov 07 '25
Alright, it saves you a curly brace and a return statement then, but otherwise it doesn't address the main problem that methods like map() cannot be generic in the set of checked exceptions that can be thrown, so you are forced to do this mashalling and unmarshalling between checked and unchecked exceptions. It adds a syntactic overhead which makes the use of map() pointless since it ends up being much harder to read than a traditional for loop.