brianguertin
It's exactly the same concept, but for Jetpack Compose, the primary toolkit used in modern Android apps.
You can use it in desktop JVM apps written in Kotlin.
Granularity. Telemetry data can be privacy-respecting (e.g. anonymously aggregated) while still being useful.
E.g. "143 people flew from NYC to LA this month" vs. "John Smith flew from NYC to LA at 2:00 pm on Tuesday."
In Kotlin you can write a library usable from C/C++/ObjC/Swift/Java/JavaScript.
And the syntax is surprisingly similar, especially considering we are supposedly comparing a low level language to a high level one.
val result = runBlocking {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
}
https://kotlinlang.org/docs/reference/coroutines/composing-s...EDIT: actually this was wishful thinking, since both functions would block the main thread. The functions need to be modified to "suspend" for this to be truly async.
My ideal language would be something like Kotlin suspend semantics, except ALL functions were implicitly "suspend" functions. If that's even possible...