Dmitry Kandalov and I try the refactoring from Chapter 9 of Java to Kotlin, A Refactoring Guidebook (https://java-to-kotlin.dev/).
When a function can be defined as a single expression, Kotlin allows us to dispense with the braces and return statement. Apart from making everything a little more compact, I've found that aiming for single-expression functions can improve my code.
If you liked this, you should probably subscribe to Dmitry's channel / dkandalov
Смотрите видео Kotlin Multi to Single Expression Functions онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Pairing with Duncan 12 Март 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 219 раз и оно понравилось 12 людям.