Kotlin Callbacks, Closures & Lambdas
KotlinBytes - Kotlin 101 ep.14 - Callbacks, Closures & Lambdas
Callbacks and Closures are oftentimes used for similar purposes. The main purpose is often asynchronous programming or event listening. Our example today show’s not only the benefit of using a callback or closure in your code, but also expresses how Kotlin has implemented a clean and simple closure syntax that should be used often where it makes sense.
Source code: https://github.com/jacobklewis/Scratch-Notes/blob/master/src/main/kotlin/me/jacoblewis/callbacks/Callbacks.kt
More details on Kotlin lambdas & closures:
https://kotlinlang.org/docs/reference/lambdas.html
Music:
Afternoon Nap by Ghostrifter Official | https://soundcloud.com/ghostrifter-official
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/deed.en_US
Dreamwalking by | e s c p | https://escp-music.bandcamp.com
Music promoted by https://www.free-stock-music.com
Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/
Lo-Fi Hip Hop Beat To Study And Relax To by 808 DEATH CLUB | https://soundcloud.com/808_deathclub
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution 3.0 Unported License
https://creativecommons.org/licenses/by/3.0/deed.en_US
Midnight Snack by Purrple Cat | https://purrplecat.com
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/deed.en_US
Видео Kotlin Callbacks, Closures & Lambdas канала KotlinBytes
Callbacks and Closures are oftentimes used for similar purposes. The main purpose is often asynchronous programming or event listening. Our example today show’s not only the benefit of using a callback or closure in your code, but also expresses how Kotlin has implemented a clean and simple closure syntax that should be used often where it makes sense.
Source code: https://github.com/jacobklewis/Scratch-Notes/blob/master/src/main/kotlin/me/jacoblewis/callbacks/Callbacks.kt
More details on Kotlin lambdas & closures:
https://kotlinlang.org/docs/reference/lambdas.html
Music:
Afternoon Nap by Ghostrifter Official | https://soundcloud.com/ghostrifter-official
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/deed.en_US
Dreamwalking by | e s c p | https://escp-music.bandcamp.com
Music promoted by https://www.free-stock-music.com
Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/
Lo-Fi Hip Hop Beat To Study And Relax To by 808 DEATH CLUB | https://soundcloud.com/808_deathclub
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution 3.0 Unported License
https://creativecommons.org/licenses/by/3.0/deed.en_US
Midnight Snack by Purrple Cat | https://purrplecat.com
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/deed.en_US
Видео Kotlin Callbacks, Closures & Lambdas канала KotlinBytes
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Improve AI Player (Part 2) ~ Android Tic Tac ToeInsert and Get Data from SQLite Database using Kotlin in AndroidWhat is a callback?Using TDD to Learn KotlinHandle One-Time Events with Kotlin's Channels - Android Studio TutorialLearn Kotlin in 12 Minutes - 2022How To Make Money With APIs ($200-300/Day) Full Tutorial for Beginnersandroid kotlin change callback to coroutine | android callback coroutine | android suspendcoroutineUsing LiveData & Flow in MVVM (S. Fatih Giris) - GDG OsloEtienne Caron — Coroutine + Flow = MVISealed ClassesWTF is runBlocking{} in Kotlin CoroutinesWhat are Kotlin Interfaces Used For and Why?Object - Kotlin VocabularyValidate Game State ~ Android Tic-Tac-ToeIntro to Kotlin Annotation Processor Part 2Understand Kotlin Coroutines on Android (Google I/O'19)Что быстрее: потоки или корутины в Kotlin?Lambda in Kotlin - Kotlin Tutorial for BeginnersIntro to Kotlin Annotation Processor Part 1