Статья с примерами, рассказывающая про использование runCatching вместо try-catch
#android #kotlin
https://proandroiddev.com/kotlin-tips-and-tricks-you-may-not-know-7-goodbye-try-catch-hello-trycatching-7135cb382609
#android #kotlin
https://proandroiddev.com/kotlin-tips-and-tricks-you-may-not-know-7-goodbye-try-catch-hello-trycatching-7135cb382609
Medium
Kotlin Tips and Tricks You May Not Know: #7 — Goodbye try-catch, Hello runCatching!
A cleaner way to handle exceptions in Kotlin with runCatching.
👍7🔥1
Что нового в Kotlin 2.2.21 (и 2.2.20!)
Overview of Kotlin 2.2.20 and 2.2.21
Dataflow-based exhaustiveness checks
Returns in expression bodies
Improved Kotlin contracts
More changes like reified types in catch clauses & invokedynamic-whens
Common atomics API updates
New array copy function
Kotlin/Wasm in Beta & Browser Debugging
Swift export available by default (experimental)
Smaller release binaries
Documentation updates
There’s more to this release!
#kotlin
https://www.youtube.com/watch?v=QWpp5-LlTqA
Overview of Kotlin 2.2.20 and 2.2.21
Dataflow-based exhaustiveness checks
Returns in expression bodies
Improved Kotlin contracts
More changes like reified types in catch clauses & invokedynamic-whens
Common atomics API updates
New array copy function
Kotlin/Wasm in Beta & Browser Debugging
Swift export available by default (experimental)
Smaller release binaries
Documentation updates
There’s more to this release!
#kotlin
https://www.youtube.com/watch?v=QWpp5-LlTqA
YouTube
What's new in Kotlin 2.2.21 (and 2.2.20!)
Kotlin 2.2.20 and its patch release 2.2.21 come with a lot of new features! On the language level, new dataflow checks allow more flexible when-expressions than before, and contracts are getting sweeping updates. Kotlin Multiplatform promotes Kotlin for WebAssembly…
👍6👎1