Короткое видео про использование оператора Elvis в комбинации с run, чтобы и вернуть значение и выполнить код в случае null.
#kotlin #elvis #nullable
https://www.youtube.com/watch?v=L9wqYQ-fXaM
#kotlin #elvis #nullable
https://www.youtube.com/watch?v=L9wqYQ-fXaM
YouTube
How YOU CAN DO MORE with the Elvis operator | Tips from the Kotlin team
The Elvis operator is a great tool for handling nullability. It can be used to provide a default non-null value instead of a given expression when this expression is null. In this episode of Kotlin Tips, Sebastian will show how to add some more logic, for…
👍15🤩1
Работа с Nullable объектами в operator функциях
#kotlin #nullable
https://www.youtube.com/watch?v=x2bZJv8i0vw
#kotlin #nullable
https://www.youtube.com/watch?v=x2bZJv8i0vw
YouTube
Operator Functions With Nullable Values | Kotlin Tips 2023
In Kotlin, you can override operators like addition and subtraction for your classes and supply your own logic. But what if you want to allow null values, both on their left and right sides?
In this episode of Kotlin Tips, Sebastian (https://twitter.com/sebi_io)…
In this episode of Kotlin Tips, Sebastian (https://twitter.com/sebi_io)…
👍10🤮1