How to use Functional (SAM) interfaces in Kotlin to achieve clean code?

Опубликовано: 21 Август 2022
на канале: Android Developer Tips
3,302
60

When defining interfaces with a single abstract method you can use a lambda expression to avoid introducing a new class or anonymous objects.
In this video, you will learn how to use the Kotlin language Functional (SAM) interfaces to achieve a clean code.

#Kotlin #SAM #FunctionalInterface #KotlinDevelopment #Android #AndroidDevelopment #SoftwareDevelopment #ADT

▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
0:00 - Intro
0:11 - What is SAM?
1:35 - SAM in action
3:00 - Functional interfaces limitations
3:57 - Even cleaner!
4:27 - Outro

▬ Links and References ▬▬▬▬▬▬▬▬▬▬▬
► Kotlin Functional (SAM) interfaces documentation
https://kotlinlang.org/docs/fun-inter...

Music from Uppbeat (free for Creators!):
https://uppbeat.io/t/zayner/falling
License code: EQUJDMMBVRFVVY1L

▬ Follow my ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► Twitter -   / @mohsenoid  
► Mastodon - https://mastodon.social/@mohsenoid@an...
► Medium -   / mohsenoid  
► Podcast - https://android-developer-tips.castos...


Смотрите видео How to use Functional (SAM) interfaces in Kotlin to achieve clean code? онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Android Developer Tips 21 Август 2022. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 3,302 раз и оно понравилось 60 посетителям.