https://kotlinlang.org logo
#vertx
Title
n

napperley

08/26/2017, 2:29 AM
To think the Kotlin example is bad. Just wait until you look at this Kotlin example with callback hell amplified, aaaah! https://github.com/vert-x3/vertx-examples/blob/master/jdbc-examples/src/main/kotlin/io/vertx/example/jdbc/streaming/JDBCExample.kt 😱
e

elizarov

08/26/2017, 7:56 PM
Looks like a perfect candidate to apply coroutines and solve this callback hell once and for all.
👍 2
j

jasoet

08/28/2017, 12:32 AM
Most Vertx api are callback based. such as vertx web-client and obviously a perfect candidate for coroutine.
j

julienviet

08/28/2017, 12:50 PM
database interaction workflow is I think the best for coroutines as it can have a non linear flow with finally closes that makes it non practical even with promises
👍 2
actually my opinion is that coroutines makes promise and stream irrelevant for writing non blocking code, so kudos to Kotlin to provide such goodness
K 3
2 Views