Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Kotlin Context Receivers - How to Use, Why, and Best Practice

Автор: Rock the JVM

Загружено: 2023-07-11

Просмотров: 6041

Описание:

blog post: https://blog.rockthejvm.com/kotlin-co...
Complete Kotlin course: https://rockthejvm.com/p/kotlin-essen...

This video is a long-form tutorial on how to use context receivers, a relatively new feature of the Kotlin language.

We talk about
why context receivers are useful when we need increased (but locally available) abstractions
how to allow some functionality for some types and not others
how to control which scopes grant which functionality
how to disallow compiler-legal but nonsensical calls
how to not abuse context receivers and do dependency injection right
some comparisons with Scala, type classes and a version of a pattern called tagless final

We'll look at the need to add extension methods, then the need to abstract extension methods only for some types and not for others. We will introduce the concept of "receiver" and "dispatch receiver" to understand how we can technically solve the problem of selective abstraction.

To overcome the inherent limtations, we'll use context receivers to
allow some functions for some types and not others
control which scopes grant which functions
disallow compiler-legal but non-sensical calls
implement "implicit" dependency injection

Follow Rock the JVM on:
LinkedIn:   / rockthejvm  
Twitter:   / rockthejvm  
Blog: Blog: https://blog.rockthejvm.com

-------------------------------------------------------------------------
Home: https://rockthejvm.com
-------------------------------------------------------------------------

Kotlin Context Receivers - How to Use, Why, and Best Practice

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Functional Error Handling in Kotlin, Part 3 - the Raise DSL

Functional Error Handling in Kotlin, Part 3 - the Raise DSL

Compose Prototyping in Kotlin Notebooks | Christian Melchior

Compose Prototyping in Kotlin Notebooks | Christian Melchior

Scala Tips

Scala Tips

Потоки против Kotlin, корутины против диспетчеров — последнее видео, которое вам понадобится

Потоки против Kotlin, корутины против диспетчеров — последнее видео, которое вам понадобится

Kotlin Code Reuse: Composing like you're Inheriting

Kotlin Code Reuse: Composing like you're Inheriting

Rich Errors in Kotlin | Michail Zarečenskij

Rich Errors in Kotlin | Michail Zarečenskij

Я в опасности

Я в опасности

Scala & Kotlin Comparison, What Kotlin Can (Graciously) Steal from Scala [KKON 2024 talk]

Scala & Kotlin Comparison, What Kotlin Can (Graciously) Steal from Scala [KKON 2024 talk]

A New Scala Ethos - Scala Days 2025 talk by Daniel Ciocîrlan

A New Scala Ethos - Scala Days 2025 talk by Daniel Ciocîrlan

Applying the Factory Method and Abstract Factory Patterns in Kotlin

Applying the Factory Method and Abstract Factory Patterns in Kotlin

Channels in Kotlin Coroutines | Nikita Koval

Channels in Kotlin Coroutines | Nikita Koval

Advanced Kotlin: Generics, Type Erasure, and Reflection Explained

Advanced Kotlin: Generics, Type Erasure, and Reflection Explained

Context Receivers Are Coming to Kotlin!

Context Receivers Are Coming to Kotlin!

Functional Error Handling In Kotlin: Either and Result

Functional Error Handling In Kotlin: Either and Result

The Essence of Coroutines

The Essence of Coroutines

The Windows 11 Disaster That's Killing Microsoft

The Windows 11 Disaster That's Killing Microsoft

Coroutines: Concurrency in Kotlin

Coroutines: Concurrency in Kotlin

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Java Virtual Threads - How Virtual Threads Work, Scheduling, Cooperation and More

Java Virtual Threads - How Virtual Threads Work, Scheduling, Cooperation and More

5 Fatal Coroutine Mistakes Nobody Tells You About

5 Fatal Coroutine Mistakes Nobody Tells You About

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com