Hello everyone,
I would like to revive discussions about checked exceptions.
I last couple of years, Kotlin improved and grew, entered new platforms.
At the same time, Android also became quite popular in automotive industry.
I work at an agency, where we have multiple Android and iOS applications (Swift / Kotlin Multi Platform), as well as automotive apps (being done in Android/Kotlin)
I went through the old discussions about this topic, and mostly it is that “people tend to ignore errors”, “it gets more complicated as projects grow”, “might be too late”…
Kotlin website also mentions this topic Exceptions | Kotlin Documentation
I want to challenge these assumptions and ask you to reevaluate checked exceptions.
From our experience, not having possibility to know which function throws or not, is a huge issue.
There are multiple teams working on different modules, some of them at external company, some of them at another agency, anything anywhere could throw (just like before optional anything anywhere could be null).
From our crash reporting analysis, a crash that is caused due to uncaught throw (where some other module throws an error) is always in the top 3. It is easy to fix these crashes after they happen, however, we need to prevent them. We never had such crashes in our Java/Swift code, and this also slows down Kotlin adoption for some teams.
As Kotlin moves to new environments where safety(not crashing) is more critical, there should be some way to prevent these issues.
How can we resolve this?
What do you think, how is your experience with such crashes?