Видео о проблеме забытых значений. Когда функция вызывается, но результат не используется. Самый распространенный пример - list.sorted().
#kotlin
https://www.youtube.com/watch?v=OyEfB6Q4Y0s
#kotlin
https://www.youtube.com/watch?v=OyEfB6Q4Y0s
YouTube
Don't forget your values! | Leonid Startsev
Recording brought to you by American Express. https://americanexpress.io/kotlin-jobs
No one likes to be forgotten, and the results of most non-unit function calls are no exception here. 'Check return value' or 'ignored call result' may sound familiar —…
No one likes to be forgotten, and the results of most non-unit function calls are no exception here. 'Check return value' or 'ignored call result' may sound familiar —…
❤4👍2
Rich Errors в Kotlin 2.4: шаг вперёд или шаг в сторону?
#kotlin #exception #error
https://habr.com/ru/companies/spring_aio/articles/931148/
Вместо того чтобы выбрасывать исключения, теперь функции могут возвращать возможные ошибки как часть своей сигнатуры:
fun fetchUser(): User | NetworkError
Такой подход делает потенциальные сбои явными, упрощает тестирование и избавляет от try-catch для предсказуемых ошибок. Новинка уже доступна в Kotlin 2.4 и, по мнению авторов, особенно полезна в бизнес-логике.
#kotlin #exception #error
https://habr.com/ru/companies/spring_aio/articles/931148/
Хабр
Rich Errors в Kotlin 2.4: шаг вперёд или шаг в сторону?
Команда Spring АйО не могла остаться в стороне и не прокомментировать одну из самых обсуждаемых новинок Kotlin, анонсированную на KotlinConf 2025 — Rich Errors. Вместо того чтобы выбрасывать...
🤔11👍10👎6🖕1
Короткий пост о том, что в Kotlin для создания коллекций существуют удобные build* функции
#kotlin #collections
https://landomen.github.io/posts/kotlin-builder-functions/
#kotlin #collections
https://landomen.github.io/posts/kotlin-builder-functions/
Domen Lanisnik
Kotlin’s Builder Functions: A Better Way to Create Lists, Maps, Strings & Sets
Kotlin offers several convenience functions to create lists, maps, strings, and more without the usual boilerplate code.
👍12
RetainedEffect - Side Effect в Compose на базе новой функции retain
#compose #kotlin #sideeffect #retain
https://proandroiddev.com/previewing-retainedeffect-a-new-side-effect-to-bridge-between-composition-and-retention-lifecycles-685b9e543de7
#compose #kotlin #sideeffect #retain
https://proandroiddev.com/previewing-retainedeffect-a-new-side-effect-to-bridge-between-composition-and-retention-lifecycles-685b9e543de7
Medium
Previewing RetainedEffect: A New Side Effect to Bridge Between Composition and Retention Lifecycles
The Jetpack Compose ecosystem has grown exponentially in recent years, and it is now widely adopted for building production-level UIs in…
👍3