https://kotlinlang.org logo
#arrow
Title
# arrow
a

Alejandro Serrano Mena

03/03/2023, 8:27 AM
this article may be interesting to some of you -> https://xebia.com/blog/the-suspend-receivers-style-in-kotlin/
K 10
🔝 7
❤️ 2
arrow intensifies 13
c

CLOVIS

03/03/2023, 8:54 AM
I'm always impressed by how many library authors are going all in on context receivers. They're not here yet, but it's clear to everyone that they are the future of Kotlin.
s

simon.vergauwen

03/03/2023, 11:05 AM
It's an insane feature for library authors TBH, it opens the door to simplifying so many DSLs (which are extremely heavily used in Kotlin). I wouldn't say we're going "all-in" in Arrow, but rather we're going "all-in" on DSLs. And as a result that makes context receivers super exciting, but we've already been on this path much longer than we've realised just how beneficial context receivers are for us. Our DSL process started 3-4 years ago when we wanted to move away from the typeclass/HKT encoding, and it's only been like 1 year since we started playing with context receivers when they experimentally become available on JVM.
This is another example of how powerful context receivers can be, and how we have to patch the same functionality today. https://github.com/arrow-kt/arrow/pull/2952
d

dave08

03/05/2023, 10:29 AM
Nice article! Sad that my first try of context receivers gave a compile error... I wonder if it's only my code and it's bugs can be avoided somehow...
10 Views