Passionate developer in Java and Scala. And sometimes, something else. A few months per year, someone calls me "professor". CoFounder of Scala By The Lagoon @scalagoon
Worthy subject. There still is a lot of space for debate, and different codebases will need very different solutions.
Time ago I had a coworker who introduced some SneakyThrows use, but ultimately we felt it hindred debugging because sometimes an Exception was swallowed without a trace in the logs, and at development time it promoted an habit to check a method implementation for "sneakiness"...
The definitive solution to this problem is only the Either monad at API level. Everything else is just impedence adaptation.
Either (or vavr.Try) might be overkill to add everywhere for large codebases. It actually depends: if you are integrating with a system/library that throws a lot of checked exceptions at you, @SneakyThrows might not be a bad idea. On the other hand, using it just a few places it might indeed increase the risk, as people will probably be unaware of what it does and its hidden quirks.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Worthy subject. There still is a lot of space for debate, and different codebases will need very different solutions.
Time ago I had a coworker who introduced some SneakyThrows use, but ultimately we felt it hindred debugging because sometimes an Exception was swallowed without a trace in the logs, and at development time it promoted an habit to check a method implementation for "sneakiness"...
The definitive solution to this problem is only the
Either
monad at API level. Everything else is just impedence adaptation.Either (or vavr.Try) might be overkill to add everywhere for large codebases. It actually depends: if you are integrating with a system/library that throws a lot of checked exceptions at you, @SneakyThrows might not be a bad idea. On the other hand, using it just a few places it might indeed increase the risk, as people will probably be unaware of what it does and its hidden quirks.